diff options
author | 2014-02-25 21:31:13 -0600 | |
---|---|---|
committer | 2014-03-31 10:08:10 -0700 | |
commit | 79b7cd69bb3268fcf9a8ad55452d1fdf21f75eb4 (patch) | |
tree | fb6fc468b50ae7c7511e0859635e52212ea02c36 /share | |
parent | cf237a0e4f51e4d57a36831459e6e3083b2ac141 (diff) |
Add fallback for label completion in older versions of Mercurial.
Diffstat (limited to 'share')
-rw-r--r-- | share/completions/hg.fish | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/share/completions/hg.fish b/share/completions/hg.fish index e698922c..fa330451 100644 --- a/share/completions/hg.fish +++ b/share/completions/hg.fish @@ -190,10 +190,12 @@ function __fish_hg_commands end function __fish_hg_labels - if contains -- --mq (commandline -poc) - printf "%s\tlabel\n" (__fish_hg debuglabelcomplete --mq) + if set -l labels (__fish_hg debuglabelcomplete ^ /dev/null) + printf "%s\tlabel\n" $labels else - printf "%s\tlabel\n" (__fish_hg debuglabelcomplete) + __fish_hg_branches + __fish_hg_bookmarks + printf "%s\ttag\n" (__fish_hg tags | cut -d " " -f 1) end end |