Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site timeinc.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!houxm!vax135!timeinc!dwight From: dwight@timeinc.UUCP (Dwight Ernest) Newsgroups: net.unix-wizards Subject: Re: PS1 change (ksh) Message-ID: <116@timeinc.UUCP> Date: Sat, 23-Mar-85 22:03:20 EST Article-I.D.: timeinc.116 Posted: Sat Mar 23 22:03:20 1985 Date-Received: Sun, 24-Mar-85 06:49:23 EST References: <245@rruxe.UUCP> <1308@amdahl.UUCP> <530@whuxl.UUCP> Reply-To: dwight@timeinc.UUCP (Dwight Ernest) Organization: Time, Inc. - New York Lines: 35 Summary: We don't have ksh, but I have used it while guesting at other sites. The following used to be part of my .env file under ksh while I was guesting, and it worked beautifully: alias lo="off" function nd { ldpwd=`pwd` cd $1 $2 >/dev/null LDPWD=$ldpwd PS1=" (! $UNAME `pwd`) \$>" PS2=" (! $UNAME `pwd`) \$\$>" PS3=" (! $UNAME `pwd`) select one>" ;} alias cd=nd Note the last alias. I has to follow immediately after the function definition ends. Also note that my .profile set UNAME=`uname -n`. And note also that this was System 5 Release 2.0. So my prompt would appear as: (32 sysname /current/working/directory) $> Where '32' is an example command number from the .history file. I included sysname from uname in my prompt because I had logins in so many different systems at the time. This way, you just use 'cd' like you always did, and, "voila!"