Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!ihnp4!inuxc!pur-ee!uiucdcs!snail!carroll From: carroll@snail.CS.UIUC.EDU Newsgroups: net.unix Subject: Re: Korn Shell Question Message-ID: <3800011@snail> Date: Thu, 30-Oct-86 11:56:00 EST Article-I.D.: snail.3800011 Posted: Thu Oct 30 11:56:00 1986 Date-Received: Sat, 1-Nov-86 02:57:12 EST References: <22300001@ntvax> Lines: 18 Nf-ID: #R:ntvax:22300001:snail:3800011:000:581 Nf-From: snail.CS.UIUC.EDU!carroll Oct 30 10:56:00 1986 Ah! Finally a question I know something about. We have tried several solutions here, and the one that we think works the best is to put into your .kshrc (remember, to make that work in Kshell, you must have ENV set and exported to the filename): ChangeDir=cd function change_dir { $ChangeDir $* PS1="(!:${PWD}) " } alias cd=change_dir cd . Using a variable to the cd inside the funtion is needed so that when the .kshrc is re-executed, you don't get a "recursive function" error. Doing the cd . changes the prompt to be right immediately after .kshrc executes.