[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 1.3-386-g17a316b

Ville Skyttä ville.skytta at iki.fi
Sun Jun 19 09:02:48 UTC 2011


The following commit has been merged in the master branch:
commit 17a316bfca13dcbd7ac432dc368ef18b35494616
Author: Raphaël Droz <raphael.droz+floss at gmail.com>
Date:   Fri Jun 17 18:23:53 2011 +0200

    lpstat error handling in case cupsd is not started.

diff --git a/completions/cups b/completions/cups
index 6618965..dcd8f2c 100644
--- a/completions/cups
+++ b/completions/cups
@@ -6,7 +6,7 @@ _cancel()
     local cur prev words cword
     _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
 
@@ -18,7 +18,7 @@ _lpr()
 
     case $prev in
         -P)
-            COMPREPLY=( $( compgen -W "$( lpstat -a | cut -d' ' -f1 )" -- "$cur" ) )
+            COMPREPLY=( $( compgen -W "$( lpstat -a 2>/dev/null | cut -d' ' -f1 )" -- "$cur" ) )
             return 0
             ;;
         -U)
@@ -49,7 +49,7 @@ _lpq()
 
     case $prev in
         -P)
-            COMPREPLY=( $( compgen -W "$( lpstat -a | cut -d' ' -f1 )" -- "$cur" ) )
+            COMPREPLY=( $( compgen -W "$( lpstat -a 2>/dev/null | cut -d' ' -f1 )" -- "$cur" ) )
             return 0
             ;;
         -U)

-- 
bash-completion



More information about the Bash-completion-commits mailing list