From f8a5a595134d2d3b52b4dd1e21be2ebc1f0ecaec Mon Sep 17 00:00:00 2001 From: Grissiom Date: Sun, 19 Sep 2010 11:04:24 +0800 Subject: [PATCH] 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. --- share/completions/git.fish | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/share/completions/git.fish b/share/completions/git.fish index 41e97a8c0..6350513ae 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -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