functions/fish_prompt.1573187721.copy (428 bytes)
1 function fish_prompt 2 set_color $fish_color_cwd 3 echo -n (prompt_pwd) 4 set_color normal 5 echo -n ":" 6 7 8 set_color purple 9 # https://stackoverflow.com/questions/24581793/ps1-prompt-in-fish-friendly-interactive-shell-show-git-branch 10 set -l git_branch (git branch ^/dev/null | sed -n '/\* /s///p') 11 echo -n (whoami)'@'(hostname)':'(prompt_pwd)'{'"$git_branch"'}' 12 set_color normal 13 echo -n ' $ ' 14 end