1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-24 05:11:08 +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

@ -1,5 +1,8 @@
2008-09-01 Clint Adams <clint@zsh.org>
* 25585: Completion/Unix/Command/_git: fix git command completion
when there are arguments after the cursor position.
* Frank Terbeck: 25583: Completion/Unix/Command/_git: more git
alias fixes.

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