1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-23 04:30:24 +02:00

25585: fix git command completion when there are arguments after the cursor position.

This commit is contained in:
Clint Adams 2008-09-01 19:24:54 +00:00
parent eeed289814
commit 2c9138bc21
2 changed files with 11 additions and 8 deletions

View file

@ -4307,15 +4307,15 @@ if [[ $service == git ]]; then
'(-p --paginate)'{-p,--paginate}'[pipe output into $PAGER]' \
'--git-dir=-[path to repository]:directory:_directories' \
'--bare[use $PWD as repository]' \
':command:->command' \
'*::options:->options' && ret=0
'*::arg:->cmd_or_options' && return
case $state in
(command)
__git_aliases_and_commands
;;
(options)
curcontext="${curcontext%:*:*}:git-$words[1]:"
_call_function ret _git-$words[1]
(cmd_or_options)
if (( CURRENT == 1 )); then
__git_aliases_and_commands
else
curcontext="${curcontext%:*:*}:git-$words[1]:"
_call_function ret _git-$words[1]
fi
;;
esac
else