[Bash-completion-devel] cups

Raphaël raphael.droz at gmail.com
Sun Jun 19 00:29:15 UTC 2011


On Sat, Jun 18, 2011 at 04:01:27PM +0300, Ville Skyttä wrote:
> On 06/13/2011 03:45 PM, Raphaël wrote:
> > Almost all issues have been addressed in the attached patches.
> 
> All applied, with some followup fixes/tweaks.
> 
> > (but, if possible, I would like to stay away from the test suite for
> > now)
> 
> Not submitting test cases means more work for folks reviewing the
> submissions, especially for commands they're not that familiar with.
I've not taken the time to dig into the test syntax yet.
I'll try to do this one of these days.

 
> To make reviewers work easier in the future, I'd recommend using git
> send-email for sending patches (note added to README), including test
> cases, and paying closer attention to the style guide (indentation and
> line wrapping).

I wanted to use send-email this time  but I realized I don't know git.

I strongly believed that the following would format 1 patch only:
$ git format-patch --stdout ee875cb29a26133f9dae0625b2369b8072ff9095 -- completions/cups
but it didn't (it is pushed in gitorious).

In fact, $(git cherry) prints far too many entries in my repo.
eg: You merged the 'compopt patch for cups', as-is: 5f11a3be6bc2f31dcc398f57800e9652c44bcf84
    In my repository, it was hashed a3f02ad7739b288be0f5aa62915e45779a26d910 
But when I do $(git cherry upstream/master), it is still available
for picking. I don't understand why, but the fact is that I'm not able
to format-patch a simple commit for cups without pulling, at least, 3
parents (already merged upstream).


$(git show) hopefully still works as I expect it to [attached]
(as does git show --format=%b)
-------------- next part --------------
commit ee875cb29a26133f9dae0625b2369b8072ff9095
Author: Raphaël Droz <raphael.droz+floss at gmail.com>
Date:   Fri Jun 17 18:23:53 2011 +0200

    lpstat error handling in case cupds is not started.

diff --git a/completions/cups b/completions/cups
index c08544b..19a7945 100644
--- a/completions/cups
+++ b/completions/cups
@@ -7,7 +7,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
 
@@ -20,7 +20,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)
@@ -52,7 +52,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)
-------------- next part --------------


diff --git a/completions/cups b/completions/cups
index c08544b..19a7945 100644
--- a/completions/cups
+++ b/completions/cups
@@ -7,7 +7,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
 
@@ -20,7 +20,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)
@@ -52,7 +52,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)


More information about the Bash-completion-devel mailing list