Merge branch 'ef/send-email-absolute-path-to-the-command'
[gitweb.git] / contrib / completion / git-completion.zsh
index 6fca145c06d49ac9a4a23aac3cf1ec6e8ec2eef8..9f6f0fa5581002a2371e062fd5def0978733edc1 100644 (file)
@@ -76,6 +76,14 @@ __gitcomp_nl ()
        compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0
 }
 
+__gitcomp_nl_append ()
+{
+       emulate -L zsh
+
+       local IFS=$'\n'
+       compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0
+}
+
 __gitcomp_file ()
 {
        emulate -L zsh
@@ -96,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