Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!umd5!uvaarpa!mcnc!codas!karthur From: karthur@codas.att.com (Kurt_R_Arthur) Newsgroups: comp.unix.wizards Subject: Re: How to have PS1 evaluated after each "cd" Message-ID: <1471@codas.att.com> Date: 31 Dec 87 15:31:04 GMT References: <1876@netsys.UUCP> Organization: AT&T, Altamonte Springs, FL Lines: 26 In article <1876@netsys.UUCP> lee@netsys.UUCP (Lee Chen) writes: > > Not So Long Ago there was a discussion about how to have the present > working directory evaluated and displayed as part of the PS1 prompt. > Would anyone (or two :-) care to summarize on effective solutions to > this "problem" via ksh, csh, sh, *sh script or C ? > In ksh I have set the folllowing in my .profile to set the path as part of the prompt: PS1="`uname` \${PWD}>" This makes my prompt the machine name, a new line, and the path followed by a ">". Example: codas /usr/karthur> If you don't want the machine name in the prompt, just: PS1="\${PWD}>" The \ is required as an escape for the $. Hope this helps! Kurt Arthur Software Services of Florida, Inc.