lpstat error handling in case cupsd is not started.
This commit is contained in:
parent
ccb8c91803
commit
17a316bfca
@ -6,7 +6,7 @@ _cancel()
|
|||||||
local cur prev words cword
|
local cur prev words cword
|
||||||
_init_completion || return
|
_init_completion || return
|
||||||
|
|
||||||
COMPREPLY=( $( compgen -W "$( lpstat | cut -d' ' -f1 )" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "$( lpstat 2>/dev/null | cut -d' ' -f1 )" -- "$cur" ) )
|
||||||
} &&
|
} &&
|
||||||
complete -F _cancel cancel
|
complete -F _cancel cancel
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ _lpr()
|
|||||||
|
|
||||||
case $prev in
|
case $prev in
|
||||||
-P)
|
-P)
|
||||||
COMPREPLY=( $( compgen -W "$( lpstat -a | cut -d' ' -f1 )" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "$( lpstat -a 2>/dev/null | cut -d' ' -f1 )" -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
-U)
|
-U)
|
||||||
@ -49,7 +49,7 @@ _lpq()
|
|||||||
|
|
||||||
case $prev in
|
case $prev in
|
||||||
-P)
|
-P)
|
||||||
COMPREPLY=( $( compgen -W "$( lpstat -a | cut -d' ' -f1 )" -- "$cur" ) )
|
COMPREPLY=( $( compgen -W "$( lpstat -a 2>/dev/null | cut -d' ' -f1 )" -- "$cur" ) )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
-U)
|
-U)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user