rmlint icon indicating copy to clipboard operation
rmlint copied to clipboard

Provide auto-completion for (most used) options in zsh/bash

Open sahib opened this issue 7 years ago • 2 comments

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:

Fish's not-so-perfect-results

(...That issue is not pressing and I just opened it to be sure to remember it...)

sahib avatar Aug 22 '17 13:08 sahib

:+1:

sragatsky avatar Aug 22 '17 14:08 sragatsky

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 ?

JLuszawski avatar Jun 07 '20 14:06 JLuszawski