From: Pascal Bourdier <pascal.bourdier@gmail.com>
To: git@vger.kernel.org
Subject: completion troubles with bash
Date: Tue, 1 May 2018 14:17:51 +0200 [thread overview]
Message-ID: <CAPQz56bts8zFfUHyKJqnefQoH97L5TTA-k3be=5HsdeEbcMqOA@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 521 bytes --]
Hi,
If "GREP_OPTIONS" is set to '--color=always' , then the git completion
send some escape characters like this :
^[[1;35;40m^[[K d^[[m^[[Kiff-files mergetool
a^[[m^[[Kdd d^[[m^[[Kiff-index mv
a^[[m^[[Kddremove d^[[m^[[Kiff-tree name-rev
a^[[m^[[Km d^[[m^[[Kifftool notes
...
So you could find a small patch to disable color with "grep" in attachment.
Regards,
Pascal Bourdier
[-- Attachment #2: git-completion.bash.patch --]
[-- Type: application/octet-stream, Size: 422 bytes --]
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index b09c8a236..0bc55b9ee 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -837,7 +837,7 @@ __git_commands () {
then
printf "%s" "${GIT_TESTING_COMMAND_COMPLETION}"
else
- git help -a|egrep '^ [a-zA-Z0-9]'
+ git help -a|egrep --color=never '^ [a-zA-Z0-9]'
fi
}
next reply other threads:[~2018-05-01 12:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-01 12:17 Pascal Bourdier [this message]
2018-05-01 12:26 ` completion troubles with bash Duy Nguyen
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPQz56bts8zFfUHyKJqnefQoH97L5TTA-k3be=5HsdeEbcMqOA@mail.gmail.com' \
--to=pascal.bourdier@gmail.com \
--cc=git@vger.kernel.org \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).