git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "SZEDER Gábor" <szeder@ira.uka.de>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: Peter van der Does <peter@avirtualhome.com>,
	"Shawn O. Pearce" <spearce@spearce.org>,
	git@vger.kernel.org, Marc Branchaud <marcnarc@xiplink.com>,
	Brian Gernhardt <brian@gernhardtsoftware.com>,
	Kevin Ballard <kevin@sb.org>,
	Mathias Lafeldt <misfire@debugon.org>
Subject: Re: [PATCH v2/RFC] Make git-completion Bash 4 compatible.
Date: Thu, 28 Oct 2010 00:53:18 +0200	[thread overview]
Message-ID: <20101027225318.GB1877@neumann> (raw)
In-Reply-To: <20101027173132.GA15657@burratino>

Hi Jonathan,


On Wed, Oct 27, 2010 at 12:31:32PM -0500, Jonathan Nieder wrote:
> Could some zsh user perhaps test that the new zsh support is not
> broken?

I'm afraid it is.

The commit message of 06f44c3 (completion: make compatible with zsh,
2010-09-06) says:

    ${var:2}
        Zsh does not implement ${var:2} to skip the first 2 characters, but
        ${var#??} works in both shells to replace the first 2 characters
        with nothing.  Thanks to Jonathan Nieder for the suggestion.

    for (( n=1; "$n" ... ))
        Zsh does not allow "$var" in arithmetic loops.  Instead, pre-compute
        the endpoint and use the variables without $'s or quotes.

However, the functions taken over from the bash-completion code
contain constructs like:

    ${cur:0:$index}
    # ok, this is not exactly the same as ${var:2}, so it might even
    # work...

and

    for (( i=0, j=0; i < ${#COMP_WORDS[@]}; i++, j++)); do

But I haven't actually tried it.


Best,
Gábor

  reply	other threads:[~2010-10-27 22:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-27 17:15 [PATCH v2/RFC] Make git-completion Bash 4 compatible Peter van der Does
2010-10-27 17:23 ` Brian Gernhardt
2010-10-27 17:31 ` Jonathan Nieder
2010-10-27 22:53   ` SZEDER Gábor [this message]
2010-10-28  0:52     ` Peter van der Does
2010-10-28  0:54       ` Jonathan Nieder
2010-10-28 12:14         ` Peter van der Does
2010-10-28 16:15           ` Jakub Narebski
2010-10-28 18:46             ` Peter van der Does
2010-10-27 22:39 ` SZEDER Gábor
2010-10-28  0:48   ` Jonathan Nieder

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101027225318.GB1877@neumann \
    --to=szeder@ira.uka.de \
    --cc=brian@gernhardtsoftware.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=kevin@sb.org \
    --cc=marcnarc@xiplink.com \
    --cc=misfire@debugon.org \
    --cc=peter@avirtualhome.com \
    --cc=spearce@spearce.org \
    /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://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).