From 406d7f1a47371bab37c53585a7bccd0a71c76f9a Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Wed, 30 Jan 2013 23:59:52 -0800 Subject: [PATCH] commit bc4f3476cded71a096adf46534784cdd84edb913 Author: U0 Date: Wed Jan 30 15:02:23 2013 +0800 add completion support for aliased command Make a variable local --- share/completions/git.fish | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/share/completions/git.fish b/share/completions/git.fish index 6a316b2c0..4a2414722 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -46,6 +46,12 @@ function __fish_git_using_command if [ $argv[1] = $cmd[2] ] return 0 end + + # aliased command + set aliased (git config --get "alias.$cmd[2]" | sed 's/ .*$//') + if [ $argv[1] = "$aliased" ] + return 0 + end end return 1 end