Created
June 10, 2015 18:48
-
-
Save jstncno/ed7d6a307278152df93d to your computer and use it in GitHub Desktop.
Change Bash Prompt
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
| # Append to ~/.profile... | |
| PS1="master:~ $" | |
| changePrompt() { | |
| if [ "$PWD" == "$HOME" ]; then | |
| PS1="master:~ $ " | |
| else | |
| PS1="master:${PWD##*/} $ " | |
| fi | |
| } | |
| export PROMPT_COMMAND=changePrompt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment