Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: yet another fix for alias handling in _git
- X-seq: zsh-workers 25640
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxxxxx>
- Subject: PATCH: yet another fix for alias handling in _git
- Date: Thu, 11 Sep 2008 00:20:01 +0200
- Mail-followup-to: zsh workers <zsh-workers@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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