19 lines
364 B
Bash

# cancel(1) completion
_cancel()
{
local cur prev words cword
_init_completion || return
COMPREPLY=( $( compgen -W "$( lpstat 2>/dev/null | cut -d' ' -f1 )" -- "$cur" ) )
} &&
complete -F _cancel cancel
# Local variables:
# mode: shell-script
# sh-basic-offset: 4
# sh-indent-comment: t
# indent-tabs-mode: nil
# End:
# ex: ts=4 sw=4 et filetype=sh