|
|
@ -134,20 +134,32 @@ __gitcomp_file_direct () |
|
|
|
__gitcomp_file "$1" "" |
|
|
|
__gitcomp_file "$1" "" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__git_complete_command () |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
emulate -L zsh |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local command="$1" |
|
|
|
|
|
|
|
local completion_func="_git_${command//-/_}" |
|
|
|
|
|
|
|
if (( $+functions[$completion_func] )); then |
|
|
|
|
|
|
|
emulate ksh -c $completion_func |
|
|
|
|
|
|
|
return 0 |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
return 1 |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
__git_zsh_bash_func () |
|
|
|
__git_zsh_bash_func () |
|
|
|
{ |
|
|
|
{ |
|
|
|
emulate -L ksh |
|
|
|
emulate -L ksh |
|
|
|
|
|
|
|
|
|
|
|
local command=$1 |
|
|
|
local command=$1 |
|
|
|
|
|
|
|
|
|
|
|
local completion_func="_git_${command//-/_}" |
|
|
|
__git_complete_command "$command" && return |
|
|
|
declare -f $completion_func >/dev/null && $completion_func && return |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local expansion=$(__git_aliased_command "$command") |
|
|
|
local expansion=$(__git_aliased_command "$command") |
|
|
|
if [ -n "$expansion" ]; then |
|
|
|
if [ -n "$expansion" ]; then |
|
|
|
words[1]=$expansion |
|
|
|
words[1]=$expansion |
|
|
|
completion_func="_git_${expansion//-/_}" |
|
|
|
__git_complete_command "$expansion" |
|
|
|
declare -f $completion_func >/dev/null && $completion_func |
|
|
|
|
|
|
|
fi |
|
|
|
fi |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|