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

John Macdonald John_M at spectrix.UUCP
Fri Jun 10 10:12:35 AEST 1988


There have been enough people tossing off sets of csh aliases for
pushd and popd and so on that I decided to toss my hat into the ring
too.

I set up the alias:

alias @@ 'alias \!:1 cd `pwd`'

Instead of trying to maintain a stack of historical directories, I just
use the command:

@@ fred

when I am in a directory that I associate with "fred".  Later, when I
am somewhere else and want to return, I just use the command:

fred

which takes me back to where I was when I defined fred.  This makes it
easy to bounce around a number of directories, without having to remember
what order I first entered them "Now is the directory I want the third
or the seventh...?".
-- 
John Macdonald   UUCP:    {mnetor,utzoo}             !spectrix!jmm



More information about the Comp.unix.wizards mailing list