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

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



	Subject: ???current directory in prompt in bash???
	Date: Tue, Dec 08, 1998 at 08:38:00AM +0000

In reply to:debian-user-request@lists.debian.org

Quoting debian-user-request@lists.debian.org(debian-user-request@lists.debian.org):
> 
> 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?
> 
> Thanks in advance....
> 
> Rich
> 

See 'man bash' for all the gory details.  Here is my prompt which is
set in .bash_profile.

# for normal everyday use use this prompt string
V_TERM=`tty`
export PS1="\[`setterm -foreground green`\]VT${V_TERM##/dev/tty} \u-Slink:\w#" 


The sequence \u-Slink:\w#    gives me  VT2 root-Slink:~#  as the
prompt.


I seem to recall that doing it this way violates Debian Policy or some
such thing.  So Beware of the Policy police.

HTH

-- 
Micro Credo:
 Never trust a computer bigger than you can lift.
_______________________________________________________
Wayne T. Topa <wtopa@ix.netcom.com>


Reply to: