Re: [PATCH v2/RFC] Make git-completion Bash 4 compatible.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]