Date: Tue, 16 Apr 1996 08:22:50 +0200 (MET DST) From: Ollivier Robert <roberto@keltia.freenix.fr> To: richmond@cronus.oanet.com (Raymond Richmond) Cc: markb@chartway.com, hackers@FreeBSD.ORG Subject: Re: Configuration Message-ID: <199604160622.IAA07083@keltia.freenix.fr> In-Reply-To: <Pine.BSD/.3.91.960415191719.7372C-100000@cronus.oanet.com> from Raymond Richmond at "Apr 15, 96 07:30:18 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
It seems that Raymond Richmond said:
> I use this little hack in my .cshrc to give me easily modified prompts.
> This one give you a machine name as well as present directory referenced
> from users home directory.
Use a Real Men Shell[tm] like tcsh. You don't need to alias cd/pushd/popd
anymore...
> if ($?prompt) then
> # An interactive shell -- set some stuff up
> set mch = `hostname -s`
> alias prompt 'set noglob;\\
> set prompt = `dirs`;\\
> set prompt = "${mch}:{!}:${prompt[1]}>";\\
> unset noglob'
> alias popd 'popd \!*; prompt'
> alias pushd 'pushd \!*; prompt'
All of these would be
set prompt="%m:%h:%~%# "
Every cd/pushd/popd will now work as expected, changing the prompt
automatically and so on.
--
Ollivier ROBERT -=- The daemon is FREE! -=- roberto@keltia.freenix.fr
FreeBSD keltia.freenix.fr 2.2-CURRENT #12: Sun Apr 14 16:01:04 MET DST 1996
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604160622.IAA07083>
