summaryrefslogtreecommitdiff
path: root/completions/cancel
diff options
context:
space:
mode:
Diffstat (limited to 'completions/cancel')
-rw-r--r--completions/cancel17
1 files changed, 16 insertions, 1 deletions
diff --git a/completions/cancel b/completions/cancel
index 2722d2a8..b903517b 100644
--- a/completions/cancel
+++ b/completions/cancel
@@ -5,7 +5,22 @@ _cancel()
local cur prev words cword
_init_completion || return
- COMPREPLY=( $( compgen -W "$( lpstat 2>/dev/null | cut -d' ' -f1 )" -- "$cur" ) )
+ case $prev in
+ -h)
+ _known_hosts_real -- "$cur"
+ return
+ ;;
+ -U)
+ return
+ ;;
+ -u)
+ COMPREPLY=( $(compgen -u -- "$cur") )
+ return
+ ;;
+ esac
+
+ COMPREPLY=( $(compgen -W \
+ "$(lpstat 2>/dev/null | cut -d' ' -f1)" -- "$cur") )
} &&
complete -F _cancel cancel