summaryrefslogtreecommitdiff
path: root/completions/abook
diff options
context:
space:
mode:
Diffstat (limited to 'completions/abook')
-rw-r--r--completions/abook28
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