From 50ae14cf7bba3a7a81e328d64d72d5b27fa65f34 Mon Sep 17 00:00:00 2001 From: Daniel Matz Date: Tue, 25 Feb 2014 21:42:15 -0600 Subject: Properly complete Mercurial bookmarks when only one bookmark exists. The if statement checking the output of hg bookmarks uses two conditions joined by the or keyword. However, only the first part was being used. Wrapping the two statements with begin and end properly combines them. --- share/completions/hg.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share/completions') diff --git a/share/completions/hg.fish b/share/completions/hg.fish index fa330451..4960c99b 100644 --- a/share/completions/hg.fish +++ b/share/completions/hg.fish @@ -227,7 +227,7 @@ end function __fish_hg_bookmarks set -l bookmarks (__fish_hg bookmarks) - if test (count $bookmarks) -gt 1; or test $bookmarks != "no bookmarks set" + if begin; test (count $bookmarks) -gt 1; or test $bookmarks != "no bookmarks set"; end printf "%s\tbookmark\n" (printf "%s\n" $bookmarks | cut -c 4- | cut -d " " -f 1) end end -- cgit v1.2.3