mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-22 16:20:23 +02:00
24701: use $service instead of $words[1] so completion will work if git is an alias to a wrapper.
This commit is contained in:
parent
25413054c1
commit
2448f0f7aa
2 changed files with 9 additions and 4 deletions
|
@ -4138,7 +4138,7 @@ __git_is_indexed () {
|
|||
unset tmpwords
|
||||
fi
|
||||
|
||||
if [[ $words[1] == git ]]; then
|
||||
if [[ $service == git ]]; then
|
||||
local state line
|
||||
declare -A opt_args
|
||||
_arguments -C \
|
||||
|
@ -4155,12 +4155,12 @@ __git_is_indexed () {
|
|||
__git_aliases_and_commands
|
||||
;;
|
||||
(options)
|
||||
curcontext="${curcontext%:*:*}:git-$words[1]:"
|
||||
_call_function ret _git-$words[1]
|
||||
curcontext="${curcontext%:*:*}:git-$service:"
|
||||
_call_function ret _git-$service
|
||||
;;
|
||||
esac
|
||||
else
|
||||
_call_function ret _$words[1]
|
||||
_call_function ret _$service
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue