Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!uwmcsd1!marque!carroll1!tkopp From: tkopp@carroll1.UUCP (Tom Kopp) Newsgroups: comp.unix.questions Subject: Re: Bourne Shell Question? Summary: Korn Shell, etc Message-ID: <201@carroll1.UUCP> Date: 1 Feb 89 21:09:59 GMT References: <8517@dasys1.UUCP> Organization: Carroll College-Waukesha, WI Lines: 27 In article <8517@dasys1.UUCP>, dap9702@dasys1.UUCP (Dan Powers) writes: > Does anyone know how to get a prompt in Bourne Shell that contains the > current working directory (pwd). I can get this to work in C shell by > specifing an alias for cd as 'cd \!*;set prompt="[`pwd`]% "'. Any and all > help would be appreciated. > DP I have not yet seen this done on a Bourne Shell, and I have asked a few people and none of them know how to do it. I seem to remember an easier way to do it in csh, but I cannot remember (has been 6 mos + since I've seen the method). Some particular reason you need it in Bourne shell only? The only shell I have figured out how to do it in is Korn shell. As an example, using PS1='$PWD >' gives me /assist/tkopp > when in home directory. -- "Those who do not understand Unix |Thomas J. Kopp are condemned to re-invent it, Poorly" |tkopp@carroll1.UUCP - Henry Spencer |uunet!marque!carroll1!tkopp