In Bash
I have my PS1
as
PS1="\u@\h:\w\$(git branch 2>/dev/null | grep -e '\* ' | sed 's/^..\(.*\)/{\1}/') \$ "
Which will show my current git branch
if I am in a git repo.
How do I set the PS1
in fish
so it will show me my current git branch?