Using the directory stack like !-2:3 in csh
Bob Toxen
bob at cloud9.UUCP
Fri May 20 11:06:17 AEST 1988
In article <115 at lakart.UUCP>, dg at 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 at 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?
More information about the Comp.unix.wizards
mailing list