From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14908 invoked by alias); 16 Dec 2013 08:14:56 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 32121 Received: (qmail 5909 invoked from network); 16 Dec 2013 08:14:42 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.2 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=; Date: Mon, 16 Dec 2013 03:14:37 -0500 From: Phil Pennock To: zsh-workers@zsh.org Subject: 5.0.3 +* -> git completion regression Message-ID: <20131216081436.GA23085@redoubt.spodhuis.org> Mail-Followup-To: zsh-workers@zsh.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline OpenPGP: url=https://www.security.spodhuis.org/PGP/keys/0x3903637F.asc % git push origin __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