Path: utzoo!dciem!nrcaer!scs!spl1!laidbak!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!necntc!ima!cfisun!lakart!dg
From: dg@lakart.UUCP (David Goodenough)
Newsgroups: comp.unix.wizards
Subject: Re: Using the directory stack like !-2:3 in csh
Message-ID: <139@lakart.UUCP>
Date: 26 May 88 14:03:02 GMT
Article-I.D.: lakart.139
Organization: Lake - The systems people
Lines: 19

Being as I started this mess, I think it only fair to tell the most elegant
solution I got:

alias	cd	'cd \!* ; sds'
alias	popd	'popd \!* ; sds'
alias	pushd	'pushd \!* ; sds'
alias	sds	'set argv=(`dirs`)'

This works because in an interactive csh argv is idle. So when I set argv
to be ( ` dirs ` ), $1 == $cwd, $2 == second dir, etc.

Absolutely brilliant. Apologies to whoever suggested this, I've forgotton
your name. I still think this is simple, elegant, and it has made my life
SO MUCH easier.
-- 
	dg@lakart.UUCP - David Goodenough		+---+
							| +-+-+
	....... !harvard!adelie!cfisun!lakart!dg	+-+-+ |
						  	  +---+