diff options
author | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2020-08-03 18:43:13 -0300 |
---|---|---|
committer | Gabriel F. T. Gomes <gabriel@inconstante.net.br> | 2020-08-03 18:43:13 -0300 |
commit | 95623d39d6029ba78ec96ad5ea08e9ac12629b91 (patch) | |
tree | ea0fe36eb5e6f40e0a1f765d44c4b0c0b2bfb089 /completions/abook | |
parent | 019f3cc463db63abc6460f97deb488deec43840b (diff) | |
download | bash-completion-95623d39d6029ba78ec96ad5ea08e9ac12629b91.tar.gz |
New upstream version 2.11upstream/2.11upstream
Diffstat (limited to 'completions/abook')
-rw-r--r-- | completions/abook | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/completions/abook b/completions/abook index 29d326b9..42197d10 100644 --- a/completions/abook +++ b/completions/abook @@ -6,12 +6,12 @@ _abook() _init_completion || return # abook only takes options, tabbing after command name adds a single dash - [[ $cword -eq 1 && -z "$cur" ]] && - { - compopt -o nospace - COMPREPLY=( "-" ) - return - } + [[ $cword -eq 1 && -z $cur ]] && + { + compopt -o nospace + COMPREPLY=("-") + return + } case $cur in -*) @@ -22,28 +22,28 @@ _abook() case $prev in --informat) - COMPREPLY=( $(compgen -W "$($1 --formats | \ + COMPREPLY=($(compgen -W "$($1 --formats | command sed -n -e 's/^'$'\t''\([a-z]*\).*/\1/p' -e '/^$/q')" \ - -- "$cur") ) + -- "$cur")) ;; --outformat) - COMPREPLY=( $(compgen -W "$($1 --formats | \ + COMPREPLY=($(compgen -W "$($1 --formats | command sed -n -e '/^$/,$s/^'$'\t''\([a-z]*\).*/\1/p')" \ - -- "$cur") ) + -- "$cur")) ;; --infile) - COMPREPLY=( $(compgen -W stdin -- "$cur") ) + COMPREPLY=($(compgen -W stdin -- "$cur")) _filedir ;; --outfile) - COMPREPLY=( $(compgen -W stdout -- "$cur") ) + COMPREPLY=($(compgen -W stdout -- "$cur")) _filedir ;; - --config|--datafile) + --config | --datafile) _filedir ;; esac } && -complete -F _abook abook + complete -F _abook abook # ex: filetype=sh |