Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!clyde!burl!codas!mtune!mtund!adam From: adam@mtund.UUCP (Adam V. Reed) Newsgroups: net.unix Subject: Re: Korn Shell Question Message-ID: <805@mtund.UUCP> Date: Sat, 1-Nov-86 23:27:50 EST Article-I.D.: mtund.805 Posted: Sat Nov 1 23:27:50 1986 Date-Received: Tue, 4-Nov-86 00:05:39 EST References: <22300001@ntvax> Organization: AT&T ISL Middletown NJ USA Lines: 21 > I have a Korn Shell question that perhaps someone can answer. I like to > have as my system prompt my current path. When I use csh, I set up my > .cshrc file with these entries: > > set prompt = "! `pwd`}" -- this establishes my prompt as my command number > and current path when i first initiate the shell > > alias cd 'chdir \!:1; set prompt=\!\`pwd`}\' > this sets up my cd command to not only change > my working directory but to change the prompt. > > I would like to have something similar to this in ksh but I'm not sure how > to change PSx on the fly. Has someone done something similar to this?? > > |# J. Michael Flanery #| Ksh maintains the path of the working directory in $PWD, so you can use PS1='! $PWD $ ' which gives you the history file line number, the path of the working directory, and "$ " to remind you you're using ksh. Adam Reed (ihnp4!mtund!adam||attmail!adamreed)