Skip to content

Instantly share code, notes, and snippets.

@voutilad
Last active July 17, 2017 21:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save voutilad/4cd5ba06c3e4de247aba to your computer and use it in GitHub Desktop.
Save voutilad/4cd5ba06c3e4de247aba to your computer and use it in GitHub Desktop.
Just my current shell prompt...
# Kyle's old prompt:
# PS1="\[\033[0;33m\][\!]\`if [[ \$? = "0" ]]; then echo "\\[\\033[32m\\]"; else echo "\\[\\033[31m\\]"; fi\`[\u.\h: \`if [[ `pwd|wc -c|tr -d " "` > 18 ]]; then echo "\\W"; else echo "\\w"; fi\`]\$\[\033[0m\] "; echo -ne "\033]0;`hostname -s`:`pwd`\007"
# Current one that's Git-friendly:
# (make sure to grab:
# curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh -o ~/.git-prompt.sh
# )
PS1='\[\e[0;32m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\]\[\e[1;33m\]$(__git_ps1 "(%s)")\[\e[1;32m\]\$\[\e[m\] \[\e[1;37m\]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment