summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2008-03-23 16:18:17 +0000
committerClint Adams <clint@users.sourceforge.net>2008-03-23 16:18:17 +0000
commit238df34af407d755a9c6fc94cade1272c7ea5b62 (patch)
tree5e84482aa123dc19912e549c03e90f2753874b84
parent082fb988c3a716082e8b445f4608070dcfed0e06 (diff)
downloadzsh-238df34af407d755a9c6fc94cade1272c7ea5b62.tar.gz
zsh-238df34af407d755a9c6fc94cade1272c7ea5b62.tar.xz
zsh-238df34af407d755a9c6fc94cade1272c7ea5b62.zip
24730: use --no-color when calling git commands that might output color codes.
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_git6
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index be9d758e8..211a5b42b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-23  Clint Adams  <clint@zsh.org>
+
+	* 24730: Completion/Unix/Command/_git: use --no-color when
+	calling git commands that might output color codes.
+
 2008-03-22  Clint Adams  <clint@zsh.org>
 
 	* 24728: Completion/Debian/Command/_aptitude: complete for
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 2724be7d0..a60e07e1e 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -2646,7 +2646,7 @@ __git_unmerged_files () {
 __git_changed_files () {
   local -a files
 
-  files=(${(ps:\0:)"$(_call_program files git diff-index -z --name-only HEAD 2>/dev/null)"})
+  files=(${(ps:\0:)"$(_call_program files git diff-index -z --name-only --no-color HEAD 2>/dev/null)"})
   __git_command_successful || return
 
   _wanted files expl 'index file' _multi_parts $@ - / files
@@ -2830,7 +2830,7 @@ __git_heads () {
   local expl
   declare -a branch_names
 
-  branch_names=(${${(f)"$(_call_program heads git branch -a 2>/dev/null)"}#[* ] })
+  branch_names=(${${(f)"$(_call_program heads git branch --no-color -a 2>/dev/null)"}#[* ] })
   __git_command_successful || return
 
   _wanted heads expl branch-name compadd $* - $branch_names
@@ -2894,7 +2894,7 @@ __git_branch_names () {
   local expl
   declare -a branch_names
 
-  branch_names=(${${(f)"$(_call_program branch-names git branch 2>/dev/null)"}#[* ] })
+  branch_names=(${${(f)"$(_call_program branch-names git branch --no-color 2>/dev/null)"}#[* ] })
   __git_command_successful || return
 
   _wanted branch-names expl branch-name compadd $* - $branch_names