Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Fix a bug in completion for 'git aliases'
- X-seq: zsh-workers 25561
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxxxxx>
- Subject: PATCH: Fix a bug in completion for 'git aliases'
- Date: Sat, 30 Aug 2008 23:34:08 +0200
- Mail-followup-to: zsh workers <zsh-workers@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Consider you got this:
[alias]
co = checkout
And try: git co <tab>
...everything looks fine; but then you try: git co -b <tab>
...which should work, too (by displaying a descriptive text:
"branch-name"), but it does not.
The reason for this is too much quoting. This should be the right fix.
Index: Completion/Unix/Command/_git
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v
retrieving revision 1.93
diff -u -r1.93 _git
--- Completion/Unix/Command/_git 30 Aug 2008 11:36:54 -0000 1.93
+++ Completion/Unix/Command/_git 30 Aug 2008 20:38:48 -0000
@@ -4290,7 +4290,7 @@
if [[ -z "${words[3,-1]}" ]] ; then
tmpwords[$(( ${#tmpwords} + 1 ))]=""
else
- tmpwords+=("${words[3,-1]}")
+ tmpwords+=(${words[3,-1]})
fi
words=("${tmpwords[@]}")
(( CURRENT += ${#${(z)git_aliases[$words[2]]}} - 1 ))
Messages sorted by:
Reverse Date,
Date,
Thread,
Author