Path: utzoo!attcan!uunet!husc6!mailrus!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!bu-cs!purdue!decwrl!decvax!cg-atla!ulowell!m2c!jjmhome!cloud9!bob From: bob@cloud9.UUCP (Bob Toxen) Newsgroups: comp.unix.wizards Subject: Re: Using the directory stack like !-2:3 in csh Summary: Here's how Message-ID: <431@cloud9.UUCP> Date: 20 May 88 01:06:17 GMT References: <115@lakart.UUCP> Organization: Stratus Computer, Inc., Marlboro, MA Lines: 26 In article <115@lakart.UUCP>, dg@lakart.UUCP (David Goodenough) writes: > If I have (say) three entries in my directory stack in csh: > % dirs > ~/work/lk/src ~/mail ~/work/vw/h/ether > > is there any way to refer to ~/mail or ~/work/vw/h/ether with a syntax > like history substitution: say I want to edit tcp.ip.h in ~/work/vw/h/ether: > ... > Can I do this?? > dg@lakart.UUCP - David Goodenough > !harvard!adelie!cfisun!lakart!dg % pushd +2 % setx=$cwd % pushd % vi $x/tcp.ip.h I haven't done this in hours! Also, I highly recommend: alias popd 'popd \!*;set prompt="\! $cwd:t % "' alias pushd 'pushd \!*;set prompt="\! $cwd:t % "' alias d dirs alias po popd alias pu pushd -- Bob Toxen {ucbvax!ihnp4,harvard,cloud9!es}!anvil!cavu!bob Stratus Computer, Marlboro, MA Pilot to Copilot: What's a mountain goat doing way up here in a cloud bank?