match the whole command for git completion

This commit is contained in:
Grissiom 2010-09-19 00:17:53 +08:00
parent d049947801
commit d957d23d8f

View File

@ -43,7 +43,8 @@ end
function __fish_git_using_command
set cmd (commandline -opc)
if [ (count $cmd) -gt 1 ]
if [ $argv[1] = $cmd[2] ]
set -e cmd[1]
if [ (echo $argv) = (echo $cmd) ]
return 0
end
end