Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!allegra!princeton!udel!burdvax!sdcrdcf!ism780c!tim From: tim@ism780c.UUCP Newsgroups: comp.unix.wizards Subject: Re: "Real" Shells Keywords: PS1 values Message-ID: <9001@ism780c.UUCP> Date: 11 Feb 88 00:22:19 GMT References: <199@mccc.UUCP> Reply-To: tim@ism780c.UUCP (Tim Smith, Knowledgian) Distribution: na Organization: Suction and Pressure Lab, California Institute of Lawsonomy Lines: 51 Posted: Wed Feb 10 19:22:19 1988 In article <199@mccc.UUCP> pjh@mccc.UUCP (Peter J. Holsberg) writes: < You recently posted that < PS1="." < displays the current directory "...with any real shell". Since it doesn't < work with the Bourne shell on SysV R3.0, I wonder what you mean by a "real < shell", C shell only???? Don't be silly. If he meant csh, he would have said set prompt=. Anyway, as the person who first suggested "PS1=.", I assure you that it works quite well on SysV R3.0. That is where I first used it. It works in all versions of the shell that I am aware of going back to at least v6. If it really fails to work on your SvsV R3 shell, I suggest contacting your vendor. I won't claim that this path to getting the current directory in your prompt is the most absolutely useful, but it is relatively good. Just remember, wherever you go, there you are. If you don't believe it, here are some examples: $ PS1=. .echo $PS1 . .pwd . . # note that 'pwd' and 'echo $PS1' gave the same result .ls (files in current directory) .ls $PS1 (files in current directory) .ls `pwd` (files in current directory) That should convince you that it works. By the way, if for some reason you wanted the parent directory of the current directory, you could try PS1=.. If you wanted the grandparent, try PS1=../.. etc, etc. These all work. -- Tim Smith tim@ism780c.ism.com "There is no dark side of the force. As a matter of fact, it's all dark"