3 ms·
Why not generate them from the manpages [1] or from the output of the --help option [2] [1] https://github.com/nevesnunes/sh-manpage-completions https://github
by maven29 5y ago
Why not generate them from the manpages [1] or from the output of the --help option [2]
[1] https://github.com/nevesnunes/sh-manpage-completions https://github.com/nevesnunes/sh-manpage-completions
[2] https://github.com/RobSis/zsh-completion-generator https://github.com/RobSis/zsh-completion-generator
- ossusermivami 5y agoit's not always ideal, only you have a very intelligent parser understanding the context of the manpage.. i.e: "-u: read a http url" the parser would need to understand to propose an https:// https:// (and perhaps the hosts on system) prefix after hitting the TAB key after the -u flag. if not it would do just the completion of switches and argument which is maybe good enough but not great... (it's a simple example that doesn't add a lot of usefulness, but there is other usecase like the -n of kubectl, it is very useful to have the completion of kubectl namespaces in there after -n)