summary refs log tree commit diff
path: root/Completion/Unix/Command/_git
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2008-09-01 18:49:32 +0000
committerClint Adams <clint@users.sourceforge.net>2008-09-01 18:49:32 +0000
commiteeed2898142517029c318ed53ece27e0e16ad99f (patch)
tree28e6d4679047142eea5e227f6ff25286f07770f7 /Completion/Unix/Command/_git
parenta19d9c7ab846ad396639dc6303f203d37372bf73 (diff)
downloadzsh-eeed2898142517029c318ed53ece27e0e16ad99f.tar.gz
zsh-eeed2898142517029c318ed53ece27e0e16ad99f.tar.xz
zsh-eeed2898142517029c318ed53ece27e0e16ad99f.zip
Frank Terbeck: 25583: more git alias fixes.
Diffstat (limited to 'Completion/Unix/Command/_git')
-rw-r--r--Completion/Unix/Command/_git14
1 files changed, 7 insertions, 7 deletions
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index ae33de0fd..05f5c3692 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -4285,16 +4285,16 @@ git_aliases=(${=${(0)${(@)${${${(f)"$(git config --get-regexp alias.\*)"}/(#s)al
 IFS=$oifs ; unset oifs
 
 if (( CURRENT >= 3 )) && [[ -n ${git_aliases[$words[2]]} ]] ; then
-  local -a tmpwords
-  tmpwords=(${words[1]} ${(z)git_aliases[$words[2]]})
-  if [[ -z "${words[3,-1]}" ]] ; then
-      tmpwords[$(( ${#tmpwords} + 1 ))]=""
-  else
+  local -a tmpwords expalias
+  expalias=(${(z)git_aliases[$words[2]]})
+  tmpwords=(${words[1]} ${expalias})
+  if [[ -n "${words[3,-1]}" ]] ; then
       tmpwords+=(${words[3,-1]})
   fi
+  tmpwords+=('')
+  (( CURRENT += ${#expalias} - 1 ))
   words=("${tmpwords[@]}")
-  (( CURRENT += ${#${(z)git_aliases[$words[2]]}} - 1 ))
-  unset tmpwords
+  unset tmpwords expalias
 fi
 
 if [[ $service == git ]]; then