13 lines
306 B
Bash

# cancel(1) completion -*- shell-script -*-
_cancel()
{
local cur prev words cword
_init_completion || return
COMPREPLY=( $( compgen -W "$( lpstat 2>/dev/null | cut -d' ' -f1 )" -- "$cur" ) )
} &&
complete -F _cancel cancel
# ex: ts=4 sw=4 et filetype=sh