diff options
Diffstat (limited to 'completions/pkgtool')
-rw-r--r-- | completions/pkgtool | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/completions/pkgtool b/completions/pkgtool index 951bae4..faf0130 100644 --- a/completions/pkgtool +++ b/completions/pkgtool @@ -1,13 +1,13 @@ # Slackware Linux pkgtool completion -*- shell-script -*- -_pkgtool() +_comp_cmd_pkgtool() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case "$prev" in --source_dir | --target_dir) - _filedir -d + _comp_compgen_filedir -d return ;; --sets) @@ -15,21 +15,20 @@ _pkgtool() return ;; --source_device) - COMPREPLY=($(compgen -f -d -- "${cur:-/dev/}")) + _comp_compgen -c "${cur:-/dev/}" -- -f -d return ;; --tagfile) - _filedir + _comp_compgen_filedir return ;; esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '--sets --ignore-tagfiles --tagfile - --source-mounted --source_dir --target_dir --source_device' \ - -- "$cur")) + _comp_compgen -- -W '--sets --ignore-tagfiles --tagfile + --source-mounted --source_dir --target_dir --source_device' fi } && - complete -F _pkgtool pkgtool + complete -F _comp_cmd_pkgtool pkgtool # ex: filetype=sh |