Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site oliveb.UUCP Path: utzoo!linus!decvax!harpo!seismo!hao!hplabs!oliveb!toml From: toml@oliveb.UUCP (Dave Long) Newsgroups: net.unix-wizards Subject: Re: CSH script help needed Message-ID: <243@oliveb.UUCP> Date: Mon, 9-Jan-84 23:49:47 EST Article-I.D.: oliveb.243 Posted: Mon Jan 9 23:49:47 1984 Date-Received: Fri, 13-Jan-84 04:00:48 EST References: <15094@sri-arpa.UUCP>, <145@csd1.UUCP>, <2711@teklabs.UUCP> Lines: 35 Actually, if you're going to do this, and you are using 4.1BSD this following stack-oriented command should provide a better arrangement. In the .login or equivalent: set dsp=0 set dr="" set ds=(. . . . . . . . . . . . . . . .) In the .cshrc or equivalent: alias pushd 'set dr=\!*;cd $dr;@ dsp++;set ds[$dsp]=$dr' alias popd 'set ds[$dsp]=".";@ dsp--;set dr=$ds[$dsp];cd $dr' alias printd 'echo $ds' a sample session is as follows: (the '> ' is the prompt) > pwd /usr/foo > pushd /usr/bletch > printd /usr/bletch . . . . . . . . . . . . . > pwd /usr/bletch > pushd /usr/bletch/bar > printd /usr/bletch /usr/bletch/bar . . . . . . . . . . > pwd /usr/bletch/bar > popd > pwd /usr/bletch . . . Dave Long {ucbvax,decvax}!decwrl!ios!oliveb!toml