diff options
author | 2013-01-30 23:59:52 -0800 | |
---|---|---|
committer | 2013-01-30 23:59:52 -0800 | |
commit | 406d7f1a47371bab37c53585a7bccd0a71c76f9a (patch) | |
tree | 93059ab7bd9719bd5077a3fecb6f04ad717757fe /share | |
parent | 7df89566f389e5a1e7df85f7b6584a105ec3072c (diff) |
Author: U0 <rhyzix@gmail.com>
Date: Wed Jan 30 15:02:23 2013 +0800
add completion support for aliased command
Make a variable local
Diffstat (limited to 'share')
-rw-r--r-- | share/completions/git.fish | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/share/completions/git.fish b/share/completions/git.fish index 6a316b2c..4a241472 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 |