Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

_git:6147: math recursion limit exceeded



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