aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Grissiom <chaos.proton@gmail.com>2010-09-19 11:04:24 +0800
committerGravatar Grissiom <chaos.proton@gmail.com>2010-09-19 11:04:24 +0800
commitf8a5a595134d2d3b52b4dd1e21be2ebc1f0ecaec (patch)
tree341e056e760085976dde0ad6fe636e34c78cd3d7
parentac3dfb3f96b133c9d28758da134461a323e68a8d (diff)
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.
-rw-r--r--share/completions/git.fish3
1 files changed, 1 insertions, 2 deletions
diff --git a/share/completions/git.fish b/share/completions/git.fish
index 41e97a8c..6350513a 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