Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jul 2000 09:53:47 +0530
From:      Rahul Siddharthan <rsidd@physics.iisc.ernet.in>
To:        Alfred Perlstein <bright@wintelcom.net>
Cc:        "David J. Kanter" <djkanter@northwestern.edu>, FreeBSD questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Setting shell prompt for C-shell
Message-ID:  <20000721095347.A9557@physics.iisc.ernet.in>
In-Reply-To: <20000720184558.T13979@fw.wintelcom.net>; from bright@wintelcom.net on Thu, Jul 20, 2000 at 06:45:59PM -0700
References:  <20000720202001.A56906@localhost.localdomain> <20000720184558.T13979@fw.wintelcom.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Alfred Perlstein said on Jul 20, 2000 at 18:45:59:
> * David J. Kanter <djkanter@northwestern.edu> [000720 18:22] wrote:
> > I'm having trouble customizing the shell prompt for csh. I'd like to have:
> > 
> > pwd % (ex. /home/david % or /usr/bin % ...)
> > 
> > In my .cshrc I have:
> > 
> > set prompt="`pwd` % "
> > 
> > Which works fine upon start-up (/home/david % ) but doesn't change as I make
> > my way through various directories. Look...

> `pwd` gets evaluated right then and there, not every time you
> hit enter, try this instead:
> 
> set prompt="%~ >"

What is that supposed to do?  When I try it I simply get a prompt like
%~ >              (this is with /bin/csh on 3.4)
and 
~ >               (with tcsh on the same machine)

> Please see the shell's manpage (man csh), in ancient and more
> barbaric times someone would show up at your door for forking pwd
> every time you hit enter.

What I use is something like this:
alias cd 'cd \!*; set prompt="\! `pwd`>"'

which sets the prompt afresh every time you use cd.  Is that what you
mean above?

Rahul.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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