Created
September 4, 2014 20:45
-
-
Save vargeorge/8b20488b7d7b6c101b4b to your computer and use it in GitHub Desktop.
Show full path on OS X terminal / iTerm before the $ prompt
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
1. Edit ~/.bash_profile and add the following line to show full path before the $ prompt. | |
For example, as user@hostname:path/to/directory$ | |
# show path before the $ prompt | |
export PS1='\u@\H:\w$ ' | |
2. Save file and restart terminal or run source command | |
$ source ~/.bash_profile | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
add PROMPT='%~ %n@%m:%# ' to ~/.zshrc