diff --git a/fish/.config/fish/functions/fish_prompt.fish b/fish/.config/fish/functions/fish_prompt.fish index 259ab779..06c56621 100644 --- a/fish/.config/fish/functions/fish_prompt.fish +++ b/fish/.config/fish/functions/fish_prompt.fish @@ -12,12 +12,19 @@ function fish_prompt set_color magenta; echo -n "($PWD)" else set pwd (basename $PWD) + set branch (git branch ^/dev/null | sed -n '/\* /s///p') if [ $pwd = $USER ] set pwd "~" end set_color magenta; echo -n "$pwd" + + if [ "$branch" ] + set_color normal; echo -n " on " + set_color yellow; echo -n "$branch" + end + set_color normal; echo -n " " set_color red; echo -n "➤" set_color green; echo -n "➤"