Printing Working Directory in CSH (or SH for that matter)

Carl W. Bergerson carl at p4tustin.UUCP
Fri May 10 03:40:49 AEST 1991


sginn at hlthnt.UUCP (Steve Ginn) writes:
>In article <46 at swatty.UUCP> root at swatty.UUCP (Superuser) writes:
>  Question:
>  Does anybody know how to set the prompt in csh so that the current directory
> 
>Try the following in the .cshrc file:
> 
> alias setprompt 'set prompt="`pwd` \\!%> "'
> setprompt

Don't forget to alias cd so that it calls setprompt after the cd.

If I remember correctly this subject was addressed in Unix World,
probably the Wizards Grabbag column, in the last quarter or half of 1989.
There might be an answer for sh there.

Carl
-- 
Carl Bergerson                                           uunet!p4tustin!carl  
Point 4 Data Corporation                                     carl at point4.com
15442 Del Amo Avenue                                   Voice: (714) 259 0777
Tustin, CA 92680-6445                                    Fax: (714) 259 0921



More information about the Comp.unix.xenix.sco mailing list