diff options
Diffstat (limited to 'completions/pkgrm')
-rw-r--r-- | completions/pkgrm | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/completions/pkgrm b/completions/pkgrm index ef3b2a8d..2449d349 100644 --- a/completions/pkgrm +++ b/completions/pkgrm @@ -2,7 +2,7 @@ # # Copyright 2006 Yann Rouillard <yann@opencsw.org> -_pkgrm () +_pkgrm() { local cur prev words cword _init_completion || return @@ -12,13 +12,13 @@ _pkgrm () # available in this directory local spool=/var/sadm/pkg local i=$cword - while [[ $((i--)) -gt 0 ]]; do - (( i-- )) - case "${words[$i]}" in + while ((i-- > 0)); do + ((i--)) + case "${words[i]}" in -s) - spool="${words[$((i+1))]}" + spool="${words[i + 1]}" break - ;; + ;; esac done @@ -29,8 +29,8 @@ _pkgrm () -s | -R) _filedir -d ;; - -Y) - ;; + -Y) ;; + *) if [[ ${cur} == -* ]]; then local opts="-a -A -n -M -R -s -v -V -Y" @@ -38,9 +38,9 @@ _pkgrm () else COMPREPLY=($(compgen -W "$(/bin/ls -1 $spool)" -- ${cur})) fi - ;; + ;; esac } && -complete -F _pkgrm pkgrm + complete -F _pkgrm pkgrm # ex: filetype=sh |