rmlint
rmlint copied to clipboard
Provide auto-completion for (most used) options in zsh/bash
As per a request from a colleague, we should distribute a shell (bash
, zsh
) auto-completion file for rmlint
's options, or at least the most used of them. Due to the vast number of options we have (and to reduce the number of places we have to change) those completion files should be generated out of the existing options via a e.g. python script.
As an inspiration, we could use fish
's completion, which is generated from the help/man:
(...That issue is not pressing and I just opened it to be sure to remember it...)
:+1:
That would be nice.
Actually, it is easy to implement if a user has bash-completion package installed. This package provides a function to generate possible completions form --help output. All that is required, is to tell the bash_completion script to generate and register completions for rmlint. For Ubuntu/Debian this is done by putting a file in /etc/bash_completion.d/ and for basic options completion it can contain just
complete -F _longopt rmlint
Where should this be done - in SConstruct ?