Skip to content

Instantly share code, notes, and snippets.

@capynet
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save capynet/25bb399bfb31cdc97f33 to your computer and use it in GitHub Desktop.
Save capynet/25bb399bfb31cdc97f33 to your computer and use it in GitHub Desktop.
Prompt personalizado y con colores para git
# Prompt personalizado y con colores para git
# ------------------------------
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PS1='\[\033[0;31m\]\[\033[0m\]\[\033[01;31m\]pc-\u\[\033[01;33m\]@\[\033[01;36m\]''\[\033[01;33m\]\w \[\033[01;35m\]\[\033[00m\]$(parse_git_branch)\$ '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment