Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
bug in _git: (was Re: _git:6147: math recursion limit exceeded )
- X-seq: zsh-workers 31064
- From: Michal Maruska <mmaruska@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: bug in _git: (was Re: _git:6147: math recursion limit exceeded )
- Date: Mon, 25 Feb 2013 11:02:22 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:date:message-id:subject:from:to :content-type; bh=Bow6bhwG0/AdbsTAyfL9rz6ymgejO8Qxgdy5aqTVVnI=; b=VO6+QeTxSCOftLI+JyOGX5evKxsRAvZOnfTB0j66G6HQnAUUGsYH4n7JY9zH+GjfT+ uO6cwLpvBLAbbXpO+Ju6Yqe8JQ8HJQhmmNaGaZ94BBhCjNsqStyR15XAtxaJIaRgtKWP ychakzJERYLRh58BNImnXyvFcupXyon7Jr5Zt6FegFCxE6Fosarhpk9NUDtjVQuN1rob 59623YIGxq02PGe8fHlI5o7hXGGlItJRsl3M2OReidWD2KLxAYxn+bHEW0tQpj9NiNGG cvzk/egrJ8RwhQn1YmCDk9tvx8mNeDikTU6e/OUuqZ3muWGuCSOkZ8wSWz8rSn55HSGK FgAw==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
It turned out, that
_git_third_party_commands+=$name$desc
should be
_git_third_party_commands+=($name $desc)
On Mon, Feb 25, 2013 at 10:31 AM, Michal Maruska <mmaruska@xxxxxxxxx> wrote:
> Hello,
> I have problem with completion for: git <TAB>.
>
> I have some "third party" git commands with provided zsh completion.
>
> They are named _git-segment _git-segment-name etc.
>
> I see this relevant code in _git:
>
> line 6139:
> declare -gUa _git_third_party_commands
>
> I would have expected -A associative array.
>
> then:
>
> local name=${${file:t}#_git-}
> if (( $+_git_third_party_commands[$name] )); then
> ....
>
> so my question is why -- $name being "segment-name" --,
> this [$name] leads to recursion? How to avoid (& why is that needed)
> xxxx-name being interpreted as arithmetic (which obviously does lead
> to recursion on $name)?
>
>
> Thank you
Messages sorted by:
Reverse Date,
Date,
Thread,
Author