contrib/completion: fix zsh completion regression
PATCH 1/1 contrib/completion: fix zsh completion regression
From: Dimitar Roustchev <[email protected]>
From: Felipe Contreras <[email protected]> @ 2021-08-16 9:19 UTC
[1]
Despite 0b18023 addressing a regression from 59d85a2, the issue described in [1] still persists as described:
compdef _git ga=git-add
ga <tab>
ga __git_find_on_cmdline:[:16: unknown condition: -lt
The suggested fix to set __git_cmd_idx for the _git function wrapper worked for me on:
- zsh v5.8.1
- git v2.40.1
[1] https://lore.kernel.org/all/[email protected]/
---
contrib/completion: fix zsh completion regression
Despite 0b18023 addressing a regression from 59d85a2, the issue described in
https://lore.kernel.org/all/[email protected]/T/
still persists as described:
compdef _git ga=git-add ga ga __git_find_on_cmdline:[:16: unknown
condition: -lt
The suggested fix to set __git_cmd_idx for the _git function wrapper worked for me on:
* zsh v5.8.1
* git v2.40.1
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1499%2Fdroustchev-pd%2Ffix-__git_cmd_idx-regression-zsh-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1499/droustchev-pd/fix-__git_cmd_idx-regression-zsh-v1
Pull-Request: https://github.com/git/git/pull/1499
contrib/completion/git-completion.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
contrib/completion/git-completion.zsh +1 -1
@@ -271,7 +271,7 @@ __git_zsh_main () _git () { local _ret=1 - local cur cword prev + local cur cword prev __git_cmd_idx=0 cur=${words[CURRENT]} prev=${words[CURRENT-1]}
base-commit: 2807bd2c10606e590886543afe4e4f208dddd489
Signature · 1 line
gitgitgadget