Hello,
forwarding a patch sent in by a Debian user. It fixes the tab-completion, so
that it doesn't show «quilt applied»'s stderr when there are no patches in
series (i.e. «quilt pop <TAB>», ...).
Thank you :)
David
--
. ''`. Debian developer | http://wiki.debian.org/DavidPaleino
: :' : Linuxer #334216 --|-- http://www.hanskalabs.net/
`. `'` GPG: 1392B174 ----|---- http://snipr.com/qa_page
`- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
>From 57136f22f379a4f76289303bbe576818ba346904 Mon Sep 17 00:00:00 2001
From: Vincenzo Tibullo <[email protected]>
Date: Sat, 12 Dec 2009 10:43:24 +0100
Subject: [PATCH] don't show stderr on tab-completion
When using bash TAB completion, such as in "quilt pop <TAB>",
if no patch is applied, it shows the standard error of the command
"quilt applied" ("No patches applied"), used in the source file
bash_completion to get the list of applied patches.
Signed-off-by: David Paleino <[email protected]>
---
bash_completion | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/bash_completion b/bash_completion
index 9fd0ebf..91d3739 100644
--- a/bash_completion
+++ b/bash_completion
@@ -123,7 +123,7 @@ _quilt_completion()
add)
case $prev in
-P)
- COMPREPLY=( $( compgen -W "$(quilt applied)" -- $cur ) )
+ COMPREPLY=( $( compgen -W "$(quilt applied 2>/dev/null)" -- $cur ) )
;;
*)
_quilt_comfile
@@ -134,7 +134,7 @@ _quilt_completion()
annotate)
case $prev in
-P)
- COMPREPLY=( $( compgen -W "$(quilt applied)" -- $cur ) )
+ COMPREPLY=( $( compgen -W "$(quilt applied 2>/dev/null)" -- $cur ) )
;;
*)
_quilt_comfile
@@ -143,7 +143,7 @@ _quilt_completion()
esac
;;
applied)
- COMPREPLY=( $( compgen -W "-h $(quilt applied)" -- $cur ) )
+ COMPREPLY=( $( compgen -W "-h $(quilt applied 2>/dev/null)" -- $cur ) )
;;
delete)
COMPREPLY=( $( compgen -W "-n -r -h --backup $(quilt series)" -- $cur ) )
@@ -154,7 +154,7 @@ _quilt_completion()
COMPREPLY=( $( compgen -W "0 1" -- $cur ) )
;;
-P|--combine)
- COMPREPLY=( $( compgen -W "$(quilt applied)" -- $cur ) )
+ COMPREPLY=( $( compgen -W "$(quilt applied 2>/dev/null)" -- $cur ) )
;;
--diff|-U|-C)
;;
@@ -171,10 +171,10 @@ _quilt_completion()
files)
case $prev in
--combine)
- COMPREPLY=( $( compgen -W "$(quilt applied)" -- $cur ) )
+ COMPREPLY=( $( compgen -W "$(quilt applied 2>/dev/null)" -- $cur ) )
;;
*)
- COMPREPLY=( $( compgen -W "-a -l -v -h --combine $(quilt applied)" -- $cur ) )
+ COMPREPLY=( $( compgen -W "-a -l -v -h --combine $(quilt applied 2>/dev/null)" -- $cur ) )
;;
esac
;;
@@ -198,7 +198,7 @@ _quilt_completion()
COMPREPLY=( $( compgen -W "files" -- $cur ) )
;;
*)
- COMPREPLY=( $( compgen -W "-T -h --all --reduce --lines --edge-labels $(quilt applied)" -- $cur ) )
+ COMPREPLY=( $( compgen -W "-T -h --all --reduce --lines --edge-labels $(quilt applied 2>/dev/null)" -- $cur ) )
;;
esac
;;
@@ -236,7 +236,7 @@ _quilt_completion()
COMPREPLY=( ${comprep...@]:-} $( compgen -W "-v -h" -- $cur ) )
;;
pop)
- COMPREPLY=( $( compgen -W "-a -f -R -q -v -h $(quilt applied)" -- $cur ) )
+ COMPREPLY=( $( compgen -W "-a -f -R -q -v -h $(quilt applied 2>/dev/null)" -- $cur ) )
;;
push)
COMPREPLY=( $( compgen -W "-a -f -q -v -h --leave-rejects --interactive --color $(quilt unapplied)" -- $cur ) )
@@ -249,14 +249,14 @@ _quilt_completion()
-U|-C)
;;
*)
- COMPREPLY=( $( compgen -W "-p -u -U -c -C -f -h $(quilt applied) --no-timestamps --no-index --diffstat --sort --backup --strip-trailing-whitespace" -- $cur ) )
+ COMPREPLY=( $( compgen -W "-p -u -U -c -C -f -h $(quilt applied 2>/dev/null) --no-timestamps --no-index --diffstat --sort --backup --strip-trailing-whitespace" -- $cur ) )
;;
esac
;;
remove)
case $prev in
-P)
- COMPREPLY=( $( compgen -W "$(quilt applied)" -- $cur ) )
+ COMPREPLY=( $( compgen -W "$(quilt applied 2>/dev/null)" -- $cur ) )
;;
*)
_quilt_comfile
--
1.6.5.GIT
_______________________________________________
Quilt-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/quilt-dev