Proposed monthly Frequently Axed Questions posting, round II

Dan Christensen jdchrist at watcgl.waterloo.edu
Thu Jun 8 11:26:33 AEST 1989


In article <21764 at iuvax.cs.indiana.edu> sahayman at 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 at watcgl.uwaterloo.ca
University of Waterloo, Waterloo, Ont.	         jdchrist at watcgl.waterloo.edu



More information about the Comp.unix.questions mailing list