mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
hg prompt: Make display slightly nicer
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.
This commit is contained in:
parent
6f2f0cfce2
commit
9a7b2b190b
1 changed files with 3 additions and 3 deletions
|
@ -47,7 +47,7 @@ function __fish_hg_prompt --description 'Write out the hg prompt'
|
||||||
# Read branch and bookmark
|
# Read branch and bookmark
|
||||||
set -l branch (cat $root/branch ^/dev/null; or echo default)
|
set -l branch (cat $root/branch ^/dev/null; or echo default)
|
||||||
if set -l bookmark (cat $root/bookmarks.current ^/dev/null)
|
if set -l bookmark (cat $root/bookmarks.current ^/dev/null)
|
||||||
set branch "$branch/$bookmark"
|
set branch "$branch|$bookmark"
|
||||||
end
|
end
|
||||||
|
|
||||||
echo -n '|'
|
echo -n '|'
|
||||||
|
@ -57,7 +57,7 @@ function __fish_hg_prompt --description 'Write out the hg prompt'
|
||||||
# Show nice color for a clean repo
|
# Show nice color for a clean repo
|
||||||
if test -z "$repo_status"
|
if test -z "$repo_status"
|
||||||
set_color $fish_color_hg_clean
|
set_color $fish_color_hg_clean
|
||||||
echo -n $branch'✓'
|
echo -n "($branch)"'✓'
|
||||||
set_color normal
|
set_color normal
|
||||||
|
|
||||||
# Handle modified or dirty (unknown state)
|
# Handle modified or dirty (unknown state)
|
||||||
|
@ -84,7 +84,7 @@ function __fish_hg_prompt --description 'Write out the hg prompt'
|
||||||
set_color $fish_color_hg_dirty
|
set_color $fish_color_hg_dirty
|
||||||
end
|
end
|
||||||
|
|
||||||
echo -n $branch'⚡'
|
echo -n "($branch)"'⚡'
|
||||||
|
|
||||||
# Sort status symbols
|
# Sort status symbols
|
||||||
for i in $fish_prompt_hg_status_order
|
for i in $fish_prompt_hg_status_order
|
||||||
|
|
Loading…
Reference in a new issue