From 2448f0f7aaf1cbb6bcaa5857f33ff893541ee1ff Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Sun, 9 Mar 2008 12:16:54 +0000 Subject: 24701: use $service instead of $words[1] so completion will work if git is an alias to a wrapper. --- Completion/Unix/Command/_git | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Completion/Unix/Command/_git') diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index c597d94f3..d15f3599e 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -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 } -- cgit v1.2.3