Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Jul 1996 18:46:40 +0100 (GMT-1)
From:      af@biomath.jussieu.fr
To:        rcutter@ctgusa.com (Ryan Cutter)
Cc:        questions@freebsd.org
Subject:   Re: Changing prompt
Message-ID:  <199607051746.SAA03663@garfield.biomath.jussieu.fr>
In-Reply-To: <1.5.4.32.19960705154424.008cda38@ctgusa.com> from "Ryan Cutter" at Jul 5, 96 11:44:24 am

next in thread | previous in thread | raw e-mail | index | archive | help
Ryan Cutter wrote / a ecrit:
> 
> Hi,
> 
>         How can I change my prompt in FreeBSD to reflect the current
> directory I'm in?
> 

If you're using tcsh (which I highly recommend), I suggest:

	set prompt="%m:%~%# "

While we're at it, I have the following in  my  .cshrc  which  I  find
useful when running xterms:

	if ($?tcsh) then
		if ("$term" == "xterm") then
			set prompt="%{^[]0;%n@%m (%l - $$) %/^G%}%# "
		else
			set prompt="%m:%~%# "
		endif
	endif

It dynamically sets my xterm banner  to  something  like :

		af@garfield (/dev/ttyp6 - 3572) /home/u/af/gnu

See "man tcsh" for all the other goodies tcsh has.

_Alain_
-- 
Alain FAUCONNET    Ingenieur systeme - System Manager     AP-HP/SIM
Public Health                91 bld de l'Hopital 75013 PARIS FRANCE
Medical Computing Research Labs         Mail: af@biomath.jussieu.fr
Tel: (+33) 1-40-77-96-19                   Fax: (+33) 1-45-86-80-68
    I've RTFMed. It says: "Refer to your system administrator"
            But... I *am* the system administrator :-]



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607051746.SAA03663>