Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 (Tek) 9/28/84 based on 9/17/84; site motel6.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!tektronix!reed!motel6!keith From: keith@motel6.UUCP (Keith Packard) Newsgroups: net.unix,net.unix-wizards Subject: Re: Prompt showing current directory (just like DOS) Message-ID: <197@motel6.UUCP> Date: Thu, 28-Nov-85 15:38:01 EST Article-I.D.: motel6.197 Posted: Thu Nov 28 15:38:01 1985 Date-Received: Sat, 30-Nov-85 00:37:45 EST References: <159@pyuxv.UUCP> Reply-To: keith@motel6.UUCP (Keith Packard) Organization: 5440 SE 41st, Portland, OR Lines: 27 Xref: watmath net.unix:6430 net.unix-wizards:15901 In article <159@pyuxv.UUCP> you write: >The following little script allows you to do the same thing >in the Korn shell ("ksh") > > > function ncd { > alias cd=cd > cd $1 > PS1="! $PWD >" > alias cd=ncd > } > alias cd=ncd > PS1=$PWD > It's far better to simply enclose cd in single quotes - the alias will not be expanded so you don't need those other two aliases: function ncd { 'cd' $* PS1="! $PWD >" } alias cd=ncd keith packard tektronix!reed!motel6!keith