Re: newbie PS1 config question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Niels Roetert wrote:

On Sun, 2004-01-25 at 18:41, Ko Pu wrote:


PS1 question:
How can I change the PS to display the current directory? According to documentation, the \w should show the current directory, but when I used it, it showed ~, what I'm looking for is to display info similar to pwd.


prompt question:
I'm using dsl modem, so the ip address is dynamic, and the prompt showed the ip address, how can I change it to my computer name? I added it to my /etc/host but I still got the ip address. This is what I have in my prompt.
[kpu@d209-121-129-174 Linux]$


Thanks in advance for your comment/suggestion

Ko Fei Pu
mailto:ko_pu@xxxxxxxxxxxxxxxxx



I always put the following line in my ~/.bashrc

	PS1=`echo "("'${PWD}'") "`

Works for me.

Greeting, Niels.



Took me a bit to crunch through that one...

It's equivalent to:

   PS1='(${PWD})\$ '

Which, IMHO, is quite a bit easier to read.

Cheers,

Johnathan




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux