Getting UNIX prompt to display current directory

Derek Lee-Wo derek at hsi.UUCP
Tue Mar 21 01:42:08 AEST 1989


In article <5582 at ncsugn.ncsu.edu> fristens at ncsugn.ncsu.edu (Brian Fristensky) writes:
>In MS-DOS there is a very easy way to get the current directory displayed as
>part of the prompt  (prompt $p).  In UNIX, there is certainly no
>straightforward way to do this.  Can anyone think of a tricky way?  My

This works only in BSD.
	alias cd 'cd \!*;set prompt="[`/bin/pwd`] "'

-- 
+-----------------------------------------------------------------------------+
|Derek Lee-Wo, Health Systems International, New Haven, CT 06511.             |
|E-mail address :- derek at hsi.com      ...!yale!hsi!derek                      |
+-----------------------------------------------------------------------------+



More information about the Comp.unix.questions mailing list