Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: yet another fix for alias handling in _git



An empty word only needs to be added to $tmpwords[] if there was an
empty word at the end of $words[] in the first place.


Index: Completion/Unix/Command/_git
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v
retrieving revision 1.102
diff -u -r1.102 _git
--- Completion/Unix/Command/_git	7 Sep 2008 16:52:28 -0000	1.102
+++ Completion/Unix/Command/_git	10 Sep 2008 22:19:11 -0000
@@ -4286,7 +4286,7 @@
   if [[ -n "${words[3,-1]}" ]] ; then
       tmpwords+=(${words[3,-1]})
   fi
-  tmpwords+=('')
+  [[ -n ${words[$CURRENT]} ]] || tmpwords+=('')
   (( CURRENT += ${#expalias} - 1 ))
   words=("${tmpwords[@]}")
   unset tmpwords expalias



Messages sorted by: Reverse Date, Date, Thread, Author