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 turtlevax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!decwrl!turtlevax!ken From: ken@turtlevax.UUCP (Ken Turkowski) Newsgroups: net.sources Subject: Re: Csh quickie Message-ID: <1058@turtlevax.UUCP> Date: Wed, 12-Feb-86 02:45:20 EST Article-I.D.: turtleva.1058 Posted: Wed Feb 12 02:45:20 1986 Date-Received: Fri, 14-Feb-86 02:58:48 EST References: <15217@rochester.UUCP> Reply-To: ken@turtlevax.UUCP (Ken Turkowski) Distribution: net Organization: CIMLINC, Inc. @ Menlo Park, CA Lines: 19 Summary: Quicker than quick In article <15217@rochester.UUCP> ken@rochester.UUCP (Ipse dixit) writes: >This alias swaps the top two directories on the stack - useful for >directory hoppers like me: > >alias / 'set dirstack=`dirs -l`; popd; cd $dirstack[1]; pushd $dirstack[2]' I've got an ever faster one, which doesn't require an alias: pushd with no arguments will swap the top two directories. You can even do pushd +2 to swap (sort of) the top and second to the top. -- Ken Turkowski @ CIMLINC, Menlo Park, CA UUCP: {amd,decwrl,hplabs,seismo,spar}!turtlevax!ken ARPA: turtlevax!ken@DECWRL.DEC.COM