Article View: comp.unix.shell
Article #32Re: CWD prompt in Bourne Shell??
From: Harald.Eikrem
Date: Sat, 31 Oct 1992 19:11
Date: Sat, 31 Oct 1992 19:11
26 lines
1831 bytes
1831 bytes
[ Repost. My first posting didn't show up on any of the local newsservers. ] ! Please excuse me if this question has already been asked... ! (I did look in the FAQ first.) I'm a new net user and just ! discovered this newsgroup. ! ! Is there anyway in Bourne shell to define the prompt to reflect ! the current working directory like you can in csh? Why on earth do you want to do interactive work in plain Bourne shell when there are vastly better alternatives? Listed as: ksh (if available), bash, zsh, tcsh. (I prefer tcsh, but that's a matter of personal taste). The latter 3 are in the public domain, and the case may be that none of these are installed at your site, however you ought to check that out. Ok, I admit that I have a setup for plain Bourne shell so that it will set the prompt, and it even does pushd/popd, like csh. It requires a version of Bourne shell that understands functions. But there is a draw- back; since it is impossible to substitute the builtin "cd" command, you have to remember to do "cwd" all the time, or else the prompt won't change. I'll send it to you separately, if you think you want a look at it. However, like I said, I urge you to proceed to better shell environments than "sh" and "csh" provides. ~~h
Technical Details
Message-ID:
<1992Oct31.191121*Harald.Eikrem@delab.sintef.no>Path:
arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!sunic!aun.uninett.no!ugle.unit.no!newsReferences:
<1992Oct28.173903.14793@ntmtv>Show Full Headers
Complete Article Headers
Newsgroups: comp.unix.shell Path: arc1-ca.pugleaf.net!sparky!uunet!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!sunic!aun.uninett.no!ugle.unit.no!news From: Harald.Eikrem@delab.sintef.no Subject: Re: CWD prompt in Bourne Shell?? In-Reply-To: Janet Jakstys <janet@ntmtv.bnr.ca>'s message of 28 Oct 1992 17:39. Message-ID: <1992Oct31.191121*Harald.Eikrem@delab.sintef.no> Sender: news@ugle.unit.no (NetNews Administrator) Organization: SINTEF DELAB, Trondheim, Norway. References: <1992Oct28.173903.14793@ntmtv> Date: 31 Oct 92 19:11:21 Lines: 26