From: Frank Terbeck <ft@bewatermyfriend.org>
To: zsh workers <zsh-workers@sunsite.dk>
Subject: PATCH: yet another fix for alias handling in _git
Date: Thu, 11 Sep 2008 00:20:01 +0200 [thread overview]
Message-ID: <20080910222001.GA2182@fsst.voodoo.lan> (raw)
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
reply other threads:[~2008-09-10 22:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080910222001.GA2182@fsst.voodoo.lan \
--to=ft@bewatermyfriend.org \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).