summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2014-04-18 11:17:36 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-04-18 11:17:36 -0700
commit961c1b191acccb13bab5895f546034bb2f47eddb (patch)
tree1c71717cd3f3401862890f59fc6401668efcd481
parentMerge branch 'fc/prompt-zsh-read-from-file' (diff)
parentcompletion: fix completing args of aliased "push", "fetch", etc. (diff)
downloadtgif-961c1b191acccb13bab5895f546034bb2f47eddb.tar.xz
Merge branch 'fc/complete-aliased-push'
* fc/complete-aliased-push: completion: fix completing args of aliased "push", "fetch", etc.
-rw-r--r--contrib/completion/git-completion.bash1
-rw-r--r--contrib/completion/git-completion.zsh1
2 files changed, 2 insertions, 0 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 87de809d23..2c59a76bc2 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2564,6 +2564,7 @@ __git_main ()
local expansion=$(__git_aliased_command "$command")
if [ -n "$expansion" ]; then
+ words[1]=$expansion
completion_func="_git_${expansion//-/_}"
declare -f $completion_func >/dev/null && $completion_func
fi
diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index 6b77968572..9f6f0fa558 100644
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -104,6 +104,7 @@ __git_zsh_bash_func ()
local expansion=$(__git_aliased_command "$command")
if [ -n "$expansion" ]; then
+ words[1]=$expansion
completion_func="_git_${expansion//-/_}"
declare -f $completion_func >/dev/null && $completion_func
fi