Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bash completion script is broken with bash-completion v2.12.0 #1537

Open
jasonkarns opened this issue Mar 14, 2024 · 3 comments · May be fixed by #1540
Open

Bash completion script is broken with bash-completion v2.12.0 #1537

jasonkarns opened this issue Mar 14, 2024 · 3 comments · May be fixed by #1540

Comments

@jasonkarns
Copy link

bash-completion v2.12.0 renamed the _split_longopt function to _comp__split_longopt in scop/bash-completion@19a3798. This is breaking ag's completion.

  1. with bash-completion 2.12.0 installed
  2. and silver searcher installed with completions
    (both the above installed via homebrew)
  3. ag SEARCHQUERY app<TAB>
    get:
$ ag SEARCHQUERY app-bash: _split_longopt: command not found

This is quite related to #1067 wherein it is discussed whether ag's completion script should be depending on a 3rd party completion library at all.

Regardless, the expedient fix is to replace the _split_longopt invocation with _comp__split_longopt. However, I have also opened scop/bash-completion#1135 against bash-completion itself to resolve their opinion on if this function should be considered part of their public api. Depending on if they alias the function for a short time, or release a patch to 2.12.0, the remediation in ag's completion may change.

@andrewplummer
Copy link

Having the same issue.

eli-schwartz added a commit to eli-schwartz/the_silver_searcher that referenced this issue Jun 16, 2024
@eli-schwartz eli-schwartz linked a pull request Jun 16, 2024 that will close this issue
@stephenfin
Copy link

stephenfin commented Oct 31, 2024

For Fedora 41+ users that run into this, I've reported it here and will let the packagers decide whether they want to temporarily include #1540 or remove ag from the repos 😞

@carlwgeorge
Copy link

The patch is pretty simple, so I went ahead and included it in the Fedora package. The unmaintained state of ag is concerning, but I'm ok kicking that can down the road until the next problem arises. I suspect that may be when pcre is retired, unless someone does the work to port ag to pcre2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants