Path: utzoo!utgpu!watmath!watcgl!jdchrist From: jdchrist@watcgl.waterloo.edu (Dan Christensen) Newsgroups: comp.unix.questions Subject: Re: Proposed monthly Frequently Axed Questions posting, round II Message-ID: <10192@watcgl.waterloo.edu> Date: 8 Jun 89 01:26:33 GMT References: <21764@iuvax.cs.indiana.edu> Reply-To: jdchrist@watcgl.waterloo.edu (Dan Christensen) Organization: Computer Graphics Lab, University of Waterloo Lines: 23 In article <21764@iuvax.cs.indiana.edu> sahayman@iuvax.cs.indiana.edu (Steve Hayman) writes: >4) How do I get the current directory into my prompt? > > It depends which shell you are using. It's easy with some shells, > hard or impossible with others. > > C Shell (csh): > Put this in your .cshrc - customize the prompt variable > the way you want. > > alias cd 'chdir \!* && set prompt="${cwd}% "' > > If you use pushd and popd, you'll also need > > alias pushd 'pushd \!* && set prompt="${cwd%} "' > alias popd 'popd \!* && set prompt="${cwd%} "' ^^^^^^^ These should be ${cwd}% shouldn't they? ---- Dan Christensen, Computer Graphics Lab, jdchrist@watcgl.uwaterloo.ca University of Waterloo, Waterloo, Ont. jdchrist@watcgl.waterloo.edu