mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-21 12:11:26 +01: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
|
@ -1,3 +1,8 @@
|
|||
2008-03-09 Clint Adams <clint@zsh.org>
|
||||
|
||||
* 24701: Completion/Unix/Command/_git: use $service instead of
|
||||
$words[1] so completion will work if git is an alias to a wrapper.
|
||||
|
||||
2008-03-08 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||
|
||||
* 24699: Src/hist.c, Src/input.c, Src/lex.c,
|
||||
|
|
|
@ -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…
Reference in a new issue