Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
default ps1 W instead of w results in no pwd absolute path
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1248
Location: 42.68n 85.41w

PostPosted: Fri Jan 31, 2014 3:19 am    Post subject: default ps1 W instead of w results in no pwd absolute path Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum