Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion script for the ctags program
At 16:08 -0600 03 Mar 2021, Jacob Gelbman <gelbman@xxxxxxxxx> wrote:
Just I don’t think it should add all the options that it could be
because it would make the output too long to read. I can’t think of
another command that has options like this,
One example would be ack (AKA ack-grep) which also has options for quite
a few programming languages. Although in its case there isn't any
common prefix for the options to turn on a language; it's just options
like `ack --python`. It also supports options like `ack --nopython` to
disable languages.
The completion for that *does* include all of those options. Yes, all of
that does make it quite verbose, but that can also be the case even
without that type of dynamic option names (I'm mainly thinking of curl
here). I still think that having the completion options actually usable
as-is is still better than requiring the user to edit the completion
results. It would likely be even better in this case if the language
portion could be treated more as the argument to an option, and so the
language list would only be presented after the prefix was already
selected.
But I'd also say that even a completion script which generates those
options in need of editing would still be an improvement over nothing.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author