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.
This commit is contained in:
Daniel Matz 2014-02-25 21:42:15 -06:00 committed by ridiculousfish
parent 79b7cd69bb
commit 50ae14cf7b

View File

@ -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