Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MY_HOST=`hostname`
- if [ -f ~/.my_host ] ; then
- MY_HOST=`cat ~/.my_host`
- fi
- export PROMPT_COMMAND='PS1="\[\033[0;33m\][\!]\`if [[ \$? = "0" ]]; then echo "\\[\\033[32m\\]"; else echo "\\[\\033[31m\\]"; fi\`[$MY_HOST:\`if [[ `pwd|wc -c|tr -d " "` > 18 ]]; then echo "\\W"; else echo "\\w"; fi\`]\$\[\033[0m\] "; echo -ne "\033]0;`hostname -s`:`pwd`\007"'
Add Comment
Please, Sign In to add comment