PROMPT_COMMAND='pwd2=$(sed "s:\([^/]\)[^/]*/:\1/:g" <<<$PWD)'
export PS1='\[\033[1;35m\][\t]\[\033[1;33m\]$pwd2\[\033[1;36m\]: '
Put the above two lines in the .bashrc file and re-login. Change \numbers to edit the colour.
export PS1='\[\033[1;35m\][\t]\[\033[1;33m\]$pwd2\[\033[1;36m\]: '
Put the above two lines in the .bashrc file and re-login. Change \numbers to edit the colour.
There seems to be a color imbalance, unless you the command text color in cyan.
ReplyDeleteAlso, you may want to try mine -
PS1="\[\e[01;32m\]\h\[\e[00;33m\] \T \[\e[01;31m\]$?\[\e[01;34m\] \[\e[01;34m\]\w\[\e[00m\]"
This one is also cool. I would put a space at the end of directory.
DeleteThis comment has been removed by the author.
Delete