Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!brl-adm!rutgers!princeton!allegra!mit-eddie!genrad!decvax!tektronix!tekcrl!terryl From: terryl@tekcrl.UUCP Newsgroups: comp.unix.wizards Subject: Re: prompt changing on the fly Message-ID: <1339@tekcrl.UUCP> Date: Thu, 22-Jan-87 13:10:12 EST Article-I.D.: tekcrl.1339 Posted: Thu Jan 22 13:10:12 1987 Date-Received: Sat, 24-Jan-87 09:44:45 EST References: <410@moncskermit.oz> Reply-To: terryl@tekcrl.TEK.COM Organization: Tektronix, Inc., Beaverton, OR. Lines: 23 In article <410@moncskermit.oz> john@moncskermit.oz (John Carey) writes: >Here is an alias for csh which replaces cd to change the prompt >when moving directories > >The only problem I have found is that it must have an argument > > alias nd cd \!\$\;set prompt=\`pwd\`\' \' > >I hope some else can suggest a more elegant solution for csh Try this: alias cd 'cd \!*; set prompt=$cwd> ' The single quotes are important (so's $cwd doesn't get interpreted when the alias is read, but when it's executed), and the \!* gets around John's problem about always having to have an argument. Just for completeness, try these aliases also: alias pushd 'pushd \!*; set prompt=$cwd> ' alias popd 'popd; set prompt=$cwd> '