diff options
Diffstat (limited to 'completions/pkgrm')
-rw-r--r-- | completions/pkgrm | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/completions/pkgrm b/completions/pkgrm index 2449d34..bb5327e 100644 --- a/completions/pkgrm +++ b/completions/pkgrm @@ -1,11 +1,11 @@ -# pkgrm completion -*- shell-script -*- +# pkgrm completion -*- shell-script -*- # # Copyright 2006 Yann Rouillard <yann@opencsw.org> -_pkgrm() +_comp_cmd_pkgrm() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return # if a spool directory was given # we must complete with the package @@ -24,23 +24,23 @@ _pkgrm() case $prev in -a | -V) - _filedir + _comp_compgen_filedir ;; -s | -R) - _filedir -d + _comp_compgen_filedir -d ;; -Y) ;; *) if [[ ${cur} == -* ]]; then local opts="-a -A -n -M -R -s -v -V -Y" - COMPREPLY=($(compgen -W "${opts}" -- ${cur})) + _comp_compgen -- -W "${opts}" else - COMPREPLY=($(compgen -W "$(/bin/ls -1 $spool)" -- ${cur})) + _comp_compgen_split -- "$(/bin/ls -1 "$spool")" fi ;; esac } && - complete -F _pkgrm pkgrm + complete -F _comp_cmd_pkgrm pkgrm # ex: filetype=sh |