Getting UNIX prompt to display current directory (Answers)

Larry Baca vwa0201 at marst2.UUCP
Sat Mar 25 02:51:23 AEST 1989


In article <87 at necbsd.NEC.COM>, gilbert at necbsd.NEC.COM (Russell Gilbert) writes:
> From article <2455 at lindy.Stanford.EDU>, by news at lindy.Stanford.EDU (News Service):
> > ) 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? 

In T-SHELL, in my .cshrc, I use:

     set prompt="%S%M%s [%h] %"

This gives me, on the first line, my current dir.
On the next line, my machine name (we have 2), followed by the current
command no.
-- 
LARRY BACA, SYSTEM ADMINISTRATOR, [4m(MARST1 MARST2)[0m
DAASO-VWA AIS, DEFENSE AUTOMATIC ADDRESSING OFFICE, WESTERN DIVISION
DDTC TRACY, TRACY CA. 95376-5057
AUTOVON 462-9391, COMERCIAL 832-9391    EMAIL PATH - dsacg1!marst2!vwa0201



More information about the Comp.unix.questions mailing list