Last active
September 21, 2018 02:41
-
-
Save Flushot/301f5201ebb65bc9db8e to your computer and use it in GitHub Desktop.
PS1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __git_ps1 () | |
| { | |
| local b="$(git symbolic-ref HEAD 2>/dev/null)"; | |
| if [ -n "$b" ]; then | |
| printf " (%s)" "${b##refs/heads/}"; | |
| fi | |
| } | |
| export PS1="\[\033[0;32m\][\D{%H:%M}] \[\033[0;32m\]\h:\[\033[0;33m\]\w\[\033[35m\]\$(__git_ps1) \[\033[0;36m\]\u\\$ \[\033[0m\]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment