-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Script to generate completion from --help
#4621
Comments
This has already been asked in #4081, and I feel like the rationale for closing that still applies. To reiterate:
So I don't feel like it's worth it. |
#4981 seems to suggest on-the-fly completion. I meant a script to “pre-compile” a completion script, I.e. a sequence of calls to |
Yes - https://github.com/fish-shell/fish-shell/blob/master/share/tools/create_manpage_completions.py. This is run the first time fish is started, and can be refreshed by running Which is probably an important bit of context - when you can already parse man pages (which is safe), there's really no real need to parse "--help" output for the very few utilities that have "--help" (or is it "-h" or "-?") but no man page. Also that script shows the limitations of generating completions - you can do options to a mostly acceptable level of quality (though the descriptions are often bad), but anything else just isn't standardized enough. |
Many command-line tools have an option
--help
which could be parse to automatically generate completions. Even if the result was not 100% perfect, this would be invaluable to lower the bar to provide fish completion. This is certainly a significant undertaking but one that is a worthy investment I reckon.The text was updated successfully, but these errors were encountered: