From: torstenk@ifi.uio.no (Torsten Robert Kirschner)
Subject: Re: Directory Prompt
Date: 1996/05/07 [thread overview]
Message-ID: <4mnec0$r34@glitnir.ifi.uio.no> (raw)
In-Reply-To: 4mgjpt$obj@northshore.shore.net
>>>>> "TMW" == Timothy M Wieman <timw@isac.hces.com> 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 <dhinkle@tpgi.com.au> 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
next prev parent reply other threads:[~1996-05-07 4:00 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-04-25 4:00 Directory Prompt dhinkle
1996-05-04 4:00 ` Martin Hannigan
1996-05-06 4:00 ` Thomas Leitner
1996-05-06 4:00 ` Timothy M. Wieman
[not found] ` <4mnec0$r34@gli <4mt0vt$4cu@csugrad.cs.vt.edu>
1996-05-10 4:00 ` John C. Fowler
1996-05-10 4:00 ` John P. Speno
1996-05-11 4:00 ` John Hascall
1996-05-07 4:00 ` Torsten Robert Kirschner [this message]
1996-05-07 4:00 ` Dan Pop
1996-05-07 4:00 ` Kevin MacNeil
1996-05-09 4:00 ` Jeff Aitken
1996-05-14 4:00 ` David A. Lyons
1996-05-09 4:00 ` Ken Brown
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox