Merge branch 'fc/complete-aliased-push'
authorJunio C Hamano <gitster@pobox.com>
Fri, 18 Apr 2014 18:17:36 +0000 (11:17 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 18 Apr 2014 18:17:36 +0000 (11:17 -0700)
* fc/complete-aliased-push:
completion: fix completing args of aliased "push", "fetch", etc.

contrib/completion/git-completion.bash
contrib/completion/git-completion.zsh
index 87de809d23146c2cee818555028cf8a24dc6c908..2c59a76bc2cf2d0fefb633efe805b6c7c15ad7ec 100644 (file)
@@ -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
index 6b779685722916f8032dce9b3b46220eb6a19414..9f6f0fa5581002a2371e062fd5def0978733edc1 100644 (file)
@@ -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