Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
5.0.3 +* -> git completion regression
- X-seq: zsh-workers 32121
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: 5.0.3 +* -> git completion regression
- Date: Mon, 16 Dec 2013 03:14:37 -0500
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201210; h=Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=3MsjNqq+u/O43hCjUH85Vnjo4ZDU5sCZRid21dI4K2k=; b=p1Gt3im2J5cQoD6XgAnE2biPhQfBNp/EY0S+5kUt2/64dHYCu6eBVbL7C+gztJ7LU4GyzgcSz7qq0DoYTqCqzvz516FKWYk98MBOk6A7j4bd1phIkRa3oeiUOoq4gZMot4p2FNzCB5udyIR9w8PsYp6LYtlnZG0Sax0wLXOgfxg=;
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Openpgp: url=https://www.security.spodhuis.org/PGP/keys/0x3903637F.asc
% git push origin <TAB>
__git_complete_remote_or_refspec:33: bad pattern: +*
Does not occur in a build from 5.0.2, does with 5.0.3; this completion
comes from the git project.
The git project has a _git file which ends up finding a
git-completion.bash file and sourcing that with:
ZSH_VERSION='' . "$script"
----------------------------8< cut here >8------------------------------
__git_complete_remote_or_refspec ()
{
local cur_="$cur" cmd="${words[1]}"
[...]
case "$cur_" in
*:*)
case "$COMP_WORDBREAKS" in
*:*) : great ;;
*) pfx="${cur_%%:*}:" ;;
esac
cur_="${cur_#*:}"
lhs=0
;;
+*)
pfx="+"
cur_="${cur_#+}"
;;
esac
[...]
----------------------------8< cut here >8------------------------------
That case matching pattern +* is on the 33rd line of the function.
So this appears to be bash not treating the + as special where zsh does.
AFAICT, this seems like perfectly reasonable behaviour on zsh's part,
but nonetheless something which used to work no longer does.
git bisect says this is 68d0d76db55c0b8778f0b68d3eda54060b576c41 :
31441: use array to decide which forms of pattern are enabled
I think the right approach might be to file a git bug instead, to modify
the _git wrapper from:
ZSH_VERSION='' . "$script"
to:
emulate sh -c 'ZSH_VERSION="" . "$script"'
since that fixes it and the zsh behavious appears correct.
Thoughts? Is there anything which zsh should be doing differently?
-Phil
Messages sorted by:
Reverse Date,
Date,
Thread,
Author