* [PATCH] Fix bash completion when `egrep` is aliased to `egrep --color=always`
@ 2012-11-22 15:41 Adam Tkac
2012-11-22 19:55 ` Marc Khouzam
0 siblings, 1 reply; 4+ messages in thread
From: Adam Tkac @ 2012-11-22 15:41 UTC (permalink / raw)
To: git
[-- Attachment #1: Type: text/plain, Size: 169 bytes --]
Hello all,
attached patch fixes bash completion when `egrep` is aliased to `egrep --color=always`.
Comments are welcomed.
Regards, Adam
--
Adam Tkac, Red Hat, Inc.
[-- Attachment #2: 0001-Fix-bash-completion-when-egrep-is-aliased-to-egrep-c.patch --]
[-- Type: text/plain, Size: 998 bytes --]
>From 2b62bd71af1158129492f74f0b77c9840a49507f Mon Sep 17 00:00:00 2001
From: Adam Tkac <atkac@redhat.com>
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
Signed-off-by: Adam Tkac <atkac@redhat.com>
Signed-off-by: Holger Arnold <holgerar@gmail.com>
---
contrib/completion/git-completion.bash | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index bc0657a..47613f9 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -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;;
--
1.8.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix bash completion when `egrep` is aliased to `egrep --color=always`
2012-11-22 15:41 [PATCH] Fix bash completion when `egrep` is aliased to `egrep --color=always` Adam Tkac
@ 2012-11-22 19:55 ` Marc Khouzam
2012-11-26 11:23 ` Adam Tkac
0 siblings, 1 reply; 4+ messages in thread
From: Marc Khouzam @ 2012-11-22 19:55 UTC (permalink / raw)
To: Adam Tkac; +Cc: git
On Thu, Nov 22, 2012 at 10:41 AM, Adam Tkac <atkac@redhat.com> wrote:
> Hello all,
>
> attached patch fixes bash completion when `egrep` is aliased to `egrep --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
>
> Comments are welcomed.
>
> Regards, Adam
>
> --
> Adam Tkac, Red Hat, Inc.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix bash completion when `egrep` is aliased to `egrep --color=always`
2012-11-22 19:55 ` Marc Khouzam
@ 2012-11-26 11:23 ` Adam Tkac
2012-11-26 11:30 ` Frans Klaver
0 siblings, 1 reply; 4+ messages in thread
From: Adam Tkac @ 2012-11-26 11:23 UTC (permalink / raw)
To: Marc Khouzam; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 597 bytes --]
On Thu, Nov 22, 2012 at 02:55:21PM -0500, Marc Khouzam wrote:
> On Thu, Nov 22, 2012 at 10:41 AM, Adam Tkac <atkac@redhat.com> wrote:
> > Hello all,
> >
> > attached patch fixes bash completion when `egrep` is aliased to `egrep --color=always`.
>
> To avoid any aliases, it may be better to use
> \egrep
Good idea, thanks. Improved patch is attached.
Regards, Adam
>
> This could be worthwhile for all utilities used by the script.
>
> Just a thought.
>
> Marc
>
>
> >
> > Comments are welcomed.
> >
> > Regards, Adam
> >
> > --
> > Adam Tkac, Red Hat, Inc.
--
Adam Tkac, Red Hat, Inc.
[-- Attachment #2: 0001-If-egrep-is-aliased-temporary-disable-it-in-bash.com.patch --]
[-- Type: text/plain, Size: 979 bytes --]
>From 255192296cd175fddcac2647447a66a0ca55b855 Mon Sep 17 00:00:00 2001
From: Adam Tkac <atkac@redhat.com>
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
Signed-off-by: Adam Tkac <atkac@redhat.com>
Signed-off-by: Holger Arnold <holgerar@gmail.com>
---
contrib/completion/git-completion.bash | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 0960acc..79073c2 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -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;;
--
1.8.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix bash completion when `egrep` is aliased to `egrep --color=always`
2012-11-26 11:23 ` Adam Tkac
@ 2012-11-26 11:30 ` Frans Klaver
0 siblings, 0 replies; 4+ messages in thread
From: Frans Klaver @ 2012-11-26 11:30 UTC (permalink / raw)
To: Adam Tkac; +Cc: Marc Khouzam, git
On Mon, Nov 26, 2012 at 12:23 PM, Adam Tkac <atkac@redhat.com> wrote:
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-11-26 11:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-22 15:41 [PATCH] Fix bash completion when `egrep` is aliased to `egrep --color=always` Adam Tkac
2012-11-22 19:55 ` Marc Khouzam
2012-11-26 11:23 ` Adam Tkac
2012-11-26 11:30 ` Frans Klaver
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).