summaryrefslogtreecommitdiffstats
path: root/completions/abook
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:19 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:19 +0000
commit6c09f2a45c5541e9c207d14fc7aa21a4a0066bde (patch)
tree0221189d367bf661f6f9493c4f17a03f0dd4b7d2 /completions/abook
parentReleasing progress-linux version 1:2.11-8~progress7.99u1. (diff)
downloadbash-completion-6c09f2a45c5541e9c207d14fc7aa21a4a0066bde.tar.xz
bash-completion-6c09f2a45c5541e9c207d14fc7aa21a4a0066bde.zip
Merging upstream version 1:2.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/abook')
-rw-r--r--completions/abook32
1 files changed, 15 insertions, 17 deletions
diff --git a/completions/abook b/completions/abook
index 42197d1..5e4c2f4 100644
--- a/completions/abook
+++ b/completions/abook
@@ -1,12 +1,12 @@
# abook(1) completion -*- shell-script -*-
-_abook()
+_comp_cmd_abook()
{
- local cur prev words cword
- _init_completion || return
+ local cur prev words cword comp_args
+ _comp_initialize -- "$@" || return
# abook only takes options, tabbing after command name adds a single dash
- [[ $cword -eq 1 && -z $cur ]] &&
+ [[ $cword -eq 1 && ! $cur ]] &&
{
compopt -o nospace
COMPREPLY=("-")
@@ -15,35 +15,33 @@ _abook()
case $cur in
-*)
- _longopt "$1"
+ _comp_complete_longopt "$@"
return
;;
esac
case $prev in
--informat)
- COMPREPLY=($(compgen -W "$($1 --formats |
- command sed -n -e 's/^'$'\t''\([a-z]*\).*/\1/p' -e '/^$/q')" \
- -- "$cur"))
+ _comp_compgen_split -- "$("$1" --formats |
+ command sed -n -e 's/^'$'\t''\([a-z]*\).*/\1/p' -e '/^$/q')"
;;
--outformat)
- COMPREPLY=($(compgen -W "$($1 --formats |
- command sed -n -e '/^$/,$s/^'$'\t''\([a-z]*\).*/\1/p')" \
- -- "$cur"))
+ _comp_compgen_split -- "$("$1" --formats |
+ command sed -n -e '/^$/,$s/^'$'\t''\([a-z]*\).*/\1/p')"
;;
--infile)
- COMPREPLY=($(compgen -W stdin -- "$cur"))
- _filedir
+ _comp_compgen -- -W stdin
+ _comp_compgen -a filedir
;;
--outfile)
- COMPREPLY=($(compgen -W stdout -- "$cur"))
- _filedir
+ _comp_compgen -- -W stdout
+ _comp_compgen -a filedir
;;
--config | --datafile)
- _filedir
+ _comp_compgen_filedir
;;
esac
} &&
- complete -F _abook abook
+ complete -F _comp_cmd_abook abook
# ex: filetype=sh