diff options
Diffstat (limited to 'bash-completion/fdformat')
-rw-r--r-- | bash-completion/fdformat | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bash-completion/fdformat b/bash-completion/fdformat index 4ad1c3d0..376000a1 100644 --- a/bash-completion/fdformat +++ b/bash-completion/fdformat @@ -1,8 +1,14 @@ _fdformat_module() { - local cur OPTS + local cur prev OPTS COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + case $prev in + '-h'|'--help'|'-V'|'--version') + return 0 + ;; + esac DEVS=$(for I in echo /dev/fd*; do if [ -e $I ]; then echo $I; fi; done) OPTS="-n --no-verify -h --help -V --version $DEVS" COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) |