From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,552b7059e033056c X-Google-Attributes: gidfee84,public From: torstenk@ifi.uio.no (Torsten Robert Kirschner) Subject: Re: Directory Prompt Date: 1996/05/07 Message-ID: <4mnec0$r34@glitnir.ifi.uio.no>#1/1 X-Deja-AN: 153481680 references: <4lt1oa$294@random.tpgi.com.au> <4mgjpt$obj@northshore.shore.net> content-type: text/plain; charset=ISO-8859-1 organization: Dept. of Informatics, University of Oslo, Norway mime-version: 1.0 reply-to: torstenk@ifi.uio.no newsgroups: comp.unix.osf.osf1 >>>>> "TMW" == Timothy M Wieman writes: In article <1996May6.165118.16175@isac.hces.com> timw@isac.hces.com (Timothy M. Wieman) writes: TMW> Martin Hannigan (hannigan@shore.net) wrote: >> In article <4lt1oa$294@random.tpgi.com.au>, >> dhinkle wrote: >> >Does anyone know how to make the c shell display the current directory >> >in the prompt, and change the prompt as you change directories. >> I think you have to use 'bash' to be able to accomplish that. TMW> Sorry I don't know about csh, but you don't have to have 'bash'; TMW> ksh, tcsh, and I'm sure others support it. Tim is right. Just put this in your ~/.cshrc file: set myhost=`expr $HOST : '\([^.]*\).*'` alias setprompt 'set prompt="$myhost `dirs` > "' alias cd 'chdir \!* && setprompt' setprompt Should work for all csh-like shells. (I'm using tcsh.) c u T. -- Torsten Robert Kirschner torstenk@ifi.uio.no torki@mpipf-muenchen.mpg.de http://www.ifi.uio.no/~torstenk/index.html