Skip to content

Commit

Permalink
hg prompt: Make display slightly nicer
Browse files Browse the repository at this point in the history
The "/" between branch and bookmark might be mistaken for a path.

Parens (like the git prompt) make it look a bit more like a unit.
  • Loading branch information
faho committed Sep 28, 2015
1 parent 3ae99e3 commit 1a1eb14
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions share/functions/__fish_hg_prompt.fish
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function __fish_hg_prompt --description 'Write out the hg prompt'
# Read branch and bookmark
set -l branch (cat $root/branch ^/dev/null; or echo default)
if set -l bookmark (cat $root/bookmarks.current ^/dev/null)
set branch "$branch/$bookmark"
set branch "$branch|$bookmark"
end

echo -n '|'
Expand All @@ -57,7 +57,7 @@ function __fish_hg_prompt --description 'Write out the hg prompt'
# Show nice color for a clean repo
if test -z "$repo_status"
set_color $fish_color_hg_clean
echo -n $branch''
echo -n "($branch)"''
set_color normal

# Handle modified or dirty (unknown state)
Expand All @@ -84,7 +84,7 @@ function __fish_hg_prompt --description 'Write out the hg prompt'
set_color $fish_color_hg_dirty
end

echo -n $branch''
echo -n "($branch)"''

# Sort status symbols
for i in $fish_prompt_hg_status_order
Expand Down

0 comments on commit 1a1eb14

Please sign in to comment.