Revert "match the whole command for git completion"

This reverts commit d957d23d8f387cfe601b9f8c6d03bca9073e9e19.
Use __fish_git_using_command to test commands and __fish_contains_opt to
test arguments.
This commit is contained in:
Grissiom 2010-09-19 11:04:24 +08:00
parent ac3dfb3f96
commit f8a5a59513

View File

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