Using the directory stack like !-2:3 in csh

David Goodenough dg at lakart.UUCP
Wed May 18 01:34:38 AEST 1988


Here's a problem I often face, and can find no reference to in the manual.

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:
currently I can supply the full path:

    ~/work/vw/h/ether/tcp.ip.h

or a relative path:

    ../../vw/h/ether/tcp.ip.h

but what I really want to do is to be able to say:

    @:3/tcp.ip.h

where @:3 gets the third entry on my directory stack.

Can I do this??
-- 
	dg at lakart.UUCP - David Goodenough		+---+
							| +-+-+
	....... !harvard!adelie!cfisun!lakart!dg	+-+-+ |
						  	  +---+



More information about the Comp.unix.wizards mailing list