diff --git a/scripts/scm-prompt.sh b/scripts/scm-prompt.sh --- a/scripts/scm-prompt.sh +++ b/scripts/scm-prompt.sh @@ -147,7 +147,11 @@ if [[ -n "$allremotemarks" ]]; then local remotemark="$(_find_most_relevant "$allremotemarks")" if [[ -n "$remotemark" ]]; then - br="$br|${remotemark}..." + br="$br|$remotemark" + if [[ "$remotemark" != "$allremotemarks" ]]; then + # if there is more than one, let the user know with an elipsis + br="${br}..." + fi fi fi fi diff --git a/tests/test-scm-prompt-hg.t b/tests/test-scm-prompt-hg.t --- a/tests/test-scm-prompt-hg.t +++ b/tests/test-scm-prompt-hg.t @@ -156,7 +156,7 @@ 4b6cc7d5194bd5dbf63970015ec75f8fd1de6dba $ echo 4b6cc7d5194bd5dbf63970015ec75f8fd1de6dba bookmarks remote/@ > .hg/remotenames $ cmd - (4b6cc7d|remote/@...) + (4b6cc7d|remote/@) Test shared bookmarks $ cmd cd .. @@ -190,7 +190,7 @@ $ cmd hg branch blah marked working directory as branch blah (branches are permanent and global, did you want a bookmark?) - (4b6cc7d|remote/@...|blah) + (4b6cc7d|remote/@|blah) $ cmd hg commit -m blah (a742469|blah) $ cmd hg up -q default