aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/completion/git-completion.bash11
1 files changed, 7 insertions, 4 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 2ac356705..8593fd707 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2216,11 +2216,14 @@ _git ()
return
fi
- local expansion=$(__git_aliased_command "$command")
- [ "$expansion" ] && command="$expansion"
-
local completion_func="_git_${command//-/_}"
- declare -F $completion_func >/dev/null && $completion_func
+ declare -F $completion_func >/dev/null && $completion_func && return
+
+ local expansion=$(__git_aliased_command "$command")
+ if [ -n "$expansion" ]; then
+ completion_func="_git_${expansion//-/_}"
+ declare -F $completion_func >/dev/null && $completion_func
+ fi
}
_gitk ()