On Mon, 2004-08-02 at 22:36 -0500, Mike Klinke wrote:
Bash provides a number of backslash-escape sequences which are
expanded when the prompt string (PS1 or PS2) is displayed. The full
list is in the manual page.
The \w expansion gives the full pathname of the current directory,
with a tilde (`~') substituted for the current value of $HOME. The
\W expansion gives the basename of the current directory. To put the
full pathname of the current directory into the path without any
tilde subsitution, use $PWD. Here are some examples:
PS1='\w$ ' # current directory with tilde
PS1='\W$ ' # basename of current directory
PS1='$PWD$ ' # full pathname of current directory
I looked through /etc/bashrc and saw a couple of lines that might be
where it's setup to show the tilde for home, but the parts I changed
didn't seem to take affect (although only thing I did was logout of
gnome instead of rebooting).
Is that the correct file and if so, what needs changing? Or can I just
add a simple PS1 line to my own bash_profile or bashrc file and just do
it for myself (only one on machine anyway)?
--
Mike Chambers
Madisonville, KY
"It's only funny until someone gets hurt...Then it's hilarious!"