All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Tkac <atkac@redhat.com>
To: Marc Khouzam <marc.khouzam@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Fix bash completion when `egrep` is aliased to `egrep --color=always`
Date: Mon, 26 Nov 2012 12:23:53 +0100	[thread overview]
Message-ID: <20121126112352.GA4481@redhat.com> (raw)
In-Reply-To: <CAFj1UpG6H3bpoa7xbqpH6Hyb6pwqE_CCgP6iT36D-ELvtVi4wA@mail.gmail.com>

[-- 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


  reply	other threads:[~2012-11-26 11:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2012-11-26 11:30     ` Frans Klaver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121126112352.GA4481@redhat.com \
    --to=atkac@redhat.com \
    --cc=git@vger.kernel.org \
    --cc=marc.khouzam@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.