-
Notifications
You must be signed in to change notification settings - Fork 137
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
Better Bash Completion #554
Comments
Regarding zsh completion, I forgot to point out this excellent project which I use. https://github.com/zsh-users/zsh-completions If you guys wanted you could simply ensure that _ack was up to date and direct users to download it/the repo. |
Hi @starcraftman, thanks for the input! To address each of your points...
Why don't you open up a post on the mailing list to discuss this; I think you've pointed out some valid problems, though, so opening up a PR to address them would be spectacular. We're in kind of a code freeze at the moment, but your changes would probably go out in 2.18! |
Personally, I would rather point people at the zsh-completions project than to distribute the file as part of the ack distro. |
@hoelzro To clarify on point 2, I employ caching to avoid this on every tab. The parsing happens only once per terminal session (i.e. the first tab complete of ack), which seems an acceptable trade off. See here. I did make a mailing list post, just linked to this topic so I didn't have to rewrite. I only mailed users, that seemed to be suggested. Re generator, that makes more sense that you package the output files. Though if I were to make a PR to put in my bash completion, then you'd only need to generate the zsh one, if that. |
There will probably be no more releases of ack 2. If this is still a relevant idea, please submit it to the ack3 repo at https://github.com/beyondgrep/ack3. |
There are some problems with current bash completion this project provides. May apply to zsh as well, though I don't currently have a replacement for that one.
Not distributed as shown by Neither the new bash and zsh completers nor the script to generate them are shipped in the CPAN tar ball #486, even if the generator were packaged
it requires the Template.pm module & App::Ack be installed(edit: forgot about the make target for this). For people just fetching the standalone bit of a nuisance having to get whole repo + gen make etc...The generated bash completion hard codes the strings for long/short opts. You need to regenerate on every change.
Some completions aren't handled well, like
ack --type=
&ack --type
. In the former, no options appear, the latter misses the no equivalents. Some other things like color completion not there.I noticed all this at this point as I was redoing some of my own bash completion scripts. I believe I've made a bash completer that is a good improvement. You can see it in my own dotfiles here. It uses ack itself to parse the opts. This means that completer should complete any version of ack, past or future.
I didn't make a PR because I think this has to be discussed re your mailing list & also something similar would have to be done for zsh I suppose. As a consequence of this change, you could simply point people to a link for the completer rather than building it That's tangential though, I'd mainly just like the default bash completion better for users.
The text was updated successfully, but these errors were encountered: