Comments (5)
JFYI/aside rg 3rd party loader in #1148
from bash-completion.
The function was removed in d659507
from bash-completion.
FWIW, i manually edited ag's completion script to use
_comp__split_longopt
instead, and all is well.
_comp__split_longopt
is not a part of public API and can be removed in the future at any time.
So i think the real question is a matter of "public api management" and "semver".
Any functions and variables whose name contains __
as a substring are not public stable interfaces and considered subject to change.
For the semver, we might have kept the old names.
I actually had a doubt about removing the old names even if they become a part of private APIs. But I haven't tried to keep it because a reasoning was given in the commit message, and also _split_longopt
was technically not a public API because we hadn't specified the range of the public API at all until 2.11.
from bash-completion.
I've checked the ag
completion. The ag
completion seems to be based on bash-completion 1 API, which is the reason that it directly depends on _split_longopt
. The ag
completion also depends on the API _get_cword
, which is explicitly deprecated in bash-completion 2.0.
- In bash-completion 2 API, from the beginning,
_split_longopt
has been an internal function that is not supposed to be called by completion functions for specific commands. The feature provided by_split_longopt
was switched to the-s
option of_init_completion
in bash-completion v1.90. That was made by commit a54857c 11 years ago. - Another function
_get_cword
that theag
completion uses was explicitly marked as@deprecated
in bash-completion v1.2 by commita8dd58c
14 years ago.
I think the ag
completion needs to switch to the bash-completion 2 API.
from bash-completion.
I thought about submitting a PR to the upstream ag
, but the mentioned repository https://github.com/ggreer/the_silver_searcher seems stale; there doesn't seem to be any activities for four years. Are there any repository of ag
that is actively maintained?
Instead, there seem to be many alternative tools [1]. For example, the latest version of ripgrep (rg
14.0.0) seems to offer a completion setting for Bash [2].
- [1] ripgrep is faster than {grep, ag, git grep, ucg, pt, sift} - Andrew Gallant's Blog
- [2] ripgrep/FAQ.md at master ยท BurntSushi/ripgrep
from bash-completion.
Related Issues (20)
- _comp_compgen_available_interfaces returns trailing colons HOT 6
- Available interface completion strips too much
- scp remote path completion no longer working since 2.12 HOT 4
- Readline colors command completions as files (red blinking text) HOT 3
- Bash completions causing syntax error near unexpected token `(' HOT 7
- Nit HOT 3
- xargs HOT 1
- Hard to find where to report bugs HOT 2
- Latest CHANGELOG.md starts at `## 2.11...` and earlier HOT 2
- Redirection moved to the front wrongly affects completions HOT 2
- Gentoo update to 2.14 fails due to QA notice HOT 3
- tar file completion not working as expected under various option combinations HOT 2
- Enable .java Filename Completion for java Command HOT 2
- GCC tests fail on non-x86 platforms HOT 1
- CDPATH autocomplete is not working HOT 5
- 000_bash_completion_compat.bash sourced last in some locales HOT 1
- bash: _comp_initialize: command not found HOT 2
- [Regression] make autocompletion skips install HOT 3
- Native bash-completion 2 loader using complete -D HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bash-completion.