Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!stanford.edu!decwrl!pa.dec.com!nntpd.lkg.dec.com!ryn.mro4.dec.com!santur.tay1.dec.com From: shah@santur.tay1.dec.com (Amitabh Shah) Newsgroups: comp.unix.ultrix Subject: Re: Pretty prompt Message-ID: <5270@ryn.mro4.dec.com> Date: 14 Jun 91 17:15:49 GMT References: <1991Jun13.163726.10604@umiami.ir.miami.edu> <13562@mentor.cc.purdue.edu> Sender: news@ryn.mro4.dec.com Reply-To: shah@santur.tay1.dec.com (Amitabh Shah) Organization: Digital Equipment Corporation, TAY1, Littleton MA Lines: 26 In-reply-to: mckay@mace.cc.purdue.edu (Dwight D. Mckay) In article <13562@mentor.cc.purdue.edu>, mckay@mace (Dwight D. Mckay) writes: >In article <1991Jun13.163726.10604@umiami.ir.miami.edu>, rfrost@umiami.ir.miami.edu writes: >|> How do I get a prompt which will always show the current directory. >|> For example: >|> >|> /usr/rfrost> > >Under csh you could put the following in your .cshrc: > >alias cd cd \!$ \; set prompt=\"\`echo \$cwd \| sed \'s\?${home}\?\~\?\'\`\>\ \" > >This puts your current path in your prompt, substitution "~" for your home directory whenever you type "cd". > Or better yet, get the latest version of tcsh, and use: set prompt="%~> " in your .login. You can do many other things with tcsh too! -amitabh. _______________________________________________________________________________ Amitabh Shah shah@santur.tay1.dec.com--(INTERNET) Digital Equipment Corporation {..}!decwrl!santur.tay1!shah--(UUCP) TP Systems Performance +1 508 952 4430--------------(PHONE) 151 Taylor St. Littleton MA 01460 +1 508 952 4197----------------(FAX)