666threesixes666 Veteran
Joined: 31 May 2011 Posts: 1248 Location: 42.68n 85.41w
|
Posted: Fri Jan 31, 2014 3:19 am Post subject: default ps1 W instead of w results in no pwd absolute path |
|
|
mkultra@mkultra [ ~ ] $ cat /etc/bash/bashrc
just after the color dirs stuff, two of the ps1 commands are funk and resulting in no pwd. it just gives the directory name not showing that it is a subdirectory of a sub directory. this fixed it for me.
Code: |
if [[ ${EUID} == 0 ]] ; then
PS1='\[\e[01;31m\]\h\[\e[01;31m\] [ \[\e[0m\]\w\[\e[1;31m\] ] \$\[\033[0m\] '
else
PS1='\[\e[01;32m\]\u@\h\[\e[01;32m\] [ \[\e[0m\]\w\[\e[1;32m\] ] \$\[\033[0m\] '
fi
alias ls='ls --color=auto'
alias grep='grep --colour=auto'
alias egrep='egrep --colour=auto'
alias fgrep='fgrep --colour=auto'
|
second one is for colorless terminals.
root /var/www/localhost shows as root localhost with \W & root /var/www/localhost with \w i see this as env pollution. |
|