Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site busch.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!mgnetp!we53!busch!dcm From: dcm@busch.UUCP (Craig Miller) Newsgroups: net.unix,net.unix-wizards Subject: Re: Prompt showing current directory (just like DOS) Message-ID: <525@busch.UUCP> Date: Fri, 29-Nov-85 09:14:55 EST Article-I.D.: busch.525 Posted: Fri Nov 29 09:14:55 1985 Date-Received: Sat, 30-Nov-85 06:38:56 EST References: <159@pyuxv.UUCP> Reply-To: dcm@busch.UUCP (Craig Miller) Organization: Anheuser-Busch Companies - St. Louis Missouri Lines: 33 Keywords: ksh, $PS1 Xref: watmath net.unix:6442 net.unix-wizards:15907 In article <159@pyuxv.UUCP> cim2@pyuxv.UUCP (Robert L. Fair) writes: > > function ncd { > alias cd=cd > cd $1 > PS1="! $PWD >" > alias cd=ncd > } > alias cd=ncd > PS1=$PWD Another neat thing about ksh is that it checks the PS1 variable for $var stuff before it prints it out. So, the same thing could be implemented like this: PS1="! \$PWD >" (notice that the backslash is needed...) >Robert L. Fair >Bell Communications Research/ C.H.C >Piscataway >N.J. >(pyuxv!cim2) -- Craig Miller UUCP: ..!ihnp4!we53!busch!dcm The Anheuser-Busch Companies; St. Louis, Mo. - Since I'm a consultant here and not an Anheuser-Busch employee, my views (or lack of) are strictly my own.