Fix bash completion when `egrep` is aliased to `egrep --color=always`
PATCH 1/1 Fix bash completion when `egrep` is aliased to `egrep --color=always`
Hello all,
attached patch fixes bash completion when egrep is aliased to egrep --color=always.
Comments are welcomed.
Regards, Adam
Signature · 1 line
Adam Tkac, Red Hat, Inc.
Quoted 1 line
From
2b62bd71af1158129492f74f0b77c9840a49507fMon Sep 17 00:00:00 2001
From: Adam Tkac <[email protected]>
Date: Thu, 22 Nov 2012 16:34:58 +0100
Subject: [PATCH] Fix bash completion when egrep is aliased to `egrep
--color=always`
Originally reported as https://bugzilla.redhat.com/show_bug.cgi?id=863780
--- contrib/completion/git-completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
contrib/completion/git-completion.bash +1 -1
@@ -565,7 +565,7 @@ __git_complete_strategy () __git_list_all_commands () { local i IFS=" "$'\n' - for i in $(git help -a|egrep '^ [a-zA-Z0-9]') + for i in $(git help -a|egrep --color=never '^ [a-zA-Z0-9]') do case $i in *--*) : helper pattern;;
Signature · 1 line
1.8.0
Quoted 3 lines · Adam Tkac
Hello all,
attached patch fixes bash completion when
egrepis aliased toegrep --color=always.
To avoid any aliases, it may be better to use
\egrep
This could be worthwhile for all utilities used by the script.
Just a thought.
Marc
Quoted 7 lines
Comments are welcomed.
Regards, Adam
--
Adam Tkac, Red Hat, Inc.
Quoted 7 lines · Marc Khouzam
Quoted 3 lines · Adam Tkac
Hello all,
attached patch fixes bash completion when
egrepis aliased toegrep --color=always.To avoid any aliases, it may be better to use
\egrep
Good idea, thanks. Improved patch is attached.
Regards, Adam
Quoted 15 lines
This could be worthwhile for all utilities used by the script.
Just a thought.
Marc
Quoted 7 lines
Comments are welcomed.
Regards, Adam
--
Adam Tkac, Red Hat, Inc.
Signature · 1 line
Adam Tkac, Red Hat, Inc.
Quoted 1 line
From
255192296cd175fddcac2647447a66a0ca55b855Mon Sep 17 00:00:00 2001
From: Adam Tkac <[email protected]>
Date: Thu, 22 Nov 2012 16:34:58 +0100
Subject: [PATCH] If egrep is aliased, temporary disable it in
bash.completion
Originally reported as https://bugzilla.redhat.com/show_bug.cgi?id=863780
--- contrib/completion/git-completion.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
contrib/completion/git-completion.bash +1 -1
@@ -565,7 +565,7 @@ __git_complete_strategy () __git_list_all_commands () { local i IFS=" "$'\n' - for i in $(git help -a|egrep '^ [a-zA-Z0-9]') + for i in $(git help -a| \egrep '^ [a-zA-Z0-9]') do case $i in *--*) : helper pattern;;
Signature · 1 line
1.8.0
Quoted 1 line · Adam Tkac
Good idea, thanks. Improved patch is attached.
It is custom on this list to mail the patches, rather than attaching them, so people can review your changes in-line. You can read more about it in in git/Documentation/SubmittingPatches.
Cheers,
Frans