Created
April 26, 2011 15:13
-
-
Save arajek/942460 to your computer and use it in GitHub Desktop.
My Bash PS1 line
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
PS1="\`if [[ \$? = "0" ]]; then echo "\\[\\033[32m\\]"; else echo "\\[\\033[31m\\]"; fi\`[\u.\h: \`if [[ `pwd|wc -c|tr -d " "` > 18 ]]; then echo "\\w"; else echo "\\w"; fi\`]\012\$\[\033[0m\] "; echo -ne "\033]0;`hostname -s`:`pwd`\007" | |
[<username>.<hostname>: <current directory>] | |
$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah I'm confused what you would use a command counter for?