Skip to content

Instantly share code, notes, and snippets.

@antillas21
Created March 17, 2012 21:51
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 antillas21/2065602 to your computer and use it in GitHub Desktop.
Save antillas21/2065602 to your computer and use it in GitHub Desktop.
# mis params para el shell prompt
export PS1='\[\033[0;36m\]\w\[\033[0m\]$(parse_git_branch)$ '
# resultado
~/Documents/Apps/2011/registrame [master]$
# los que menciona Miguel
export PS1="\[\033[35m\]\t\[\033[m\]-\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]$(parse_git_branch)$ "
# resultado
14:49:19-aantillon@phoenix:~/Documents/Apps/2011/registrame$
# No muestra el resultado de "parsear" el git branch, porque no funciona con comillas dobles.
# Si lo cambiamos a comillas sencillas:
export PS1='\[\033[35m\]\t\[\033[m\]-\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]$(parse_git_branch)$ '
# resulta en:
14:49:19-aantillon@phoenix:~/Documents/Apps/2011/registrame [master]$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment