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

Re: ???current directory in prompt in bash???



Hi Rich,

On Tue, Dec 08, 1998 at 08:38:00AM +0000, Rich Hartman wrote:
> Is there a way to have bash include the current directory in the 
> prompt of bash? Actually, let me re-phrase that.... my "root" account 
> DOES include the current directory in the the prompt, but I have no 
> idea why or how... I've tried to copy my root's .bash_profile to my 
> "regular-user's" .bash_profile, but it still doesn't work.... any 
> ideas?

something along the lines of 
	export PS1="\\w \$ "
is your friend.  the excape-sequence "\w" produces the current working
directory if I am not mistaken.
Check "man bash" for more details (search for PS1).
Also, check root's .bashrc, most likely the prompt variable is defined here.
on my Hamm-Systems .bashrc sources .bash_profile.


So long,
Stephan
-- 
Stephan Engelke                                    engelke@math.uni-hamburg.de
                                     *** Coffee not found: Operator halted ***


Reply to: