diff --git a/share/tools/web_config/sample_prompts/sorin.fish b/share/tools/web_config/sample_prompts/sorin.fish index 8f6c67cb1..69fff2d14 100644 --- a/share/tools/web_config/sample_prompts/sorin.fish +++ b/share/tools/web_config/sample_prompts/sorin.fish @@ -16,7 +16,7 @@ function fish_right_prompt test $status != 0 and printf (set_color red)"⏎ " - if git rev-parse 2>/dev/null + if set -l git_dir (git rev-parse --git-dir 2>/dev/null) # Magenta if branch detached else green set -l branch (command git branch -qv | string match "\**") string match -rq detached -- $branch @@ -25,6 +25,11 @@ function fish_right_prompt git name-rev --name-only HEAD + # Merging state + test -f "$git_dir/MERGE_HEAD" + and printf ':'(set_color red)'merge' + printf ' ' + # Symbols if set -l count (command git rev-list --count --left-right $upstream...HEAD 2>/dev/null) echo $count | read -l ahead behind