From: Pascal Bourdier Date: Tue, 01 May 2018 12:17:51 GMT Subject: completion troubles with bash Message-ID: 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 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 }