From owner-freebsd-questions Thu Jul 20 21:24: 4 2000 Delivered-To: freebsd-questions@freebsd.org Received: from theory1.physics.iisc.ernet.in (theory1.physics.iisc.ernet.in [144.16.71.20]) by hub.freebsd.org (Postfix) with SMTP id EDE1B37B5C1 for ; Thu, 20 Jul 2000 21:23:54 -0700 (PDT) (envelope-from rsidd@physics.iisc.ernet.in) Received: (qmail 63817 invoked from network); 21 Jul 2000 04:23:48 -0000 Received: from sys3.physics.iisc.ernet.in (144.16.71.27) by theory1.physics.iisc.ernet.in with SMTP; 21 Jul 2000 04:23:48 -0000 Received: (qmail 9682 invoked by uid 211); 21 Jul 2000 04:23:47 -0000 Date: Fri, 21 Jul 2000 09:53:47 +0530 From: Rahul Siddharthan To: Alfred Perlstein Cc: "David J. Kanter" , FreeBSD questions Subject: Re: Setting shell prompt for C-shell Message-ID: <20000721095347.A9557@physics.iisc.ernet.in> Mail-Followup-To: Alfred Perlstein , "David J. Kanter" , FreeBSD questions References: <20000720202001.A56906@localhost.localdomain> <20000720184558.T13979@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20000720184558.T13979@fw.wintelcom.net>; from bright@wintelcom.net on Thu, Jul 20, 2000 at 06:45:59PM -0700 X-Operating-System: Linux 2.0.31 i486 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Alfred Perlstein said on Jul 20, 2000 at 18:45:59: > * David J. Kanter [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