Created
October 24, 2013 19:46
-
-
Save incanus/7143758 to your computer and use it in GitHub Desktop.
This file contains 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
NO_COLOR="\[\e[0m\]" | |
LIGHT_GRAY="\[\e[30;1m\]" | |
RED="\[\e[0;31m\]" | |
__user_and_host="$NO_COLOR\u$LIGHT_GRAY@$NO_COLOR\H" | |
__date_and_time="$NO_COLOR\d$LIGHT_GRAY|$NO_COLOR\T" | |
__git_branch='$(__git_ps1 "%s")' | |
__working_path="$NO_COLOR\w" | |
__prompt_symbol="$NO_COLOR\$" | |
PS1="$LIGHT_GRAY--($__user_and_host$LIGHT_GRAY)--($__date_and_time$LIGHT_GRAY)--($RED$__git_branch$LIGHT_GRAY)--- -- -\n$LIGHT_GRAY--($__working_path$LIGHT_GRAY)--($__prompt_symbol " | |
export PS1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This ends up looking like this normally:
And like this in a Git working copy:
This has username, hostname, date, time, Git branch, current directory, and
$
or#
depending on superuser status.