Skip to content

Instantly share code, notes, and snippets.

@yaychris
Last active December 25, 2015 21:59
Show Gist options
  • Save yaychris/7046148 to your computer and use it in GitHub Desktop.
Save yaychris/7046148 to your computer and use it in GitHub Desktop.
function fish_prompt
set_color green
echo -n (pwd | sed "s!^$HOME!~!")
set_color cyan
if test -d .git
echo -n '' (git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1]/")
if [ (git status 2> /dev/null | tail -n1) != 'nothing to commit, working directory clean' ]
echo -n "☹"
end
end
echo -n '' (rbenv versions 2> /dev/null | awk '/^\* / { print "(" $2 ")" } ')
set_color white
echo
echo -n '→ '
set_color normal
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment