summaryrefslogtreecommitdiffstats
path: root/completions/lpq
diff options
context:
space:
mode:
Diffstat (limited to 'completions/lpq')
-rw-r--r--completions/lpq16
1 files changed, 8 insertions, 8 deletions
diff --git a/completions/lpq b/completions/lpq
index 36729d2..d9c29bb 100644
--- a/completions/lpq
+++ b/completions/lpq
@@ -1,28 +1,28 @@
# lpq(1) completion -*- shell-script -*-
-_lpq()
+_comp_cmd_lpq()
{
- local cur prev words cword
- _init_completion || return
+ local cur prev words cword comp_args
+ _comp_initialize -- "$@" || return
case $prev in
-P)
- COMPREPLY=($(compgen -W "$(lpstat -a 2>/dev/null | cut -d' ' -f1)" -- "$cur"))
+ _comp_compgen_split -- "$(lpstat -a 2>/dev/null | cut -d' ' -f1)"
return
;;
-U)
- COMPREPLY=($(compgen -u -- "$cur"))
+ _comp_compgen -- -u
return
;;
esac
if [[ $cur == - ]]; then
- COMPREPLY=($(compgen -W '-E -P -U -a -h -l' -- "$cur"))
+ _comp_compgen -- -W '-E -P -U -a -h -l'
return
fi
- _filedir
+ _comp_compgen_filedir
} &&
- complete -F _lpq lpq
+ complete -F _comp_cmd_lpq lpq
# ex: filetype=sh