Csh quickie
Ken Turkowski
ken at turtlevax.UUCP
Wed Feb 12 17:45:20 AEST 1986
In article <15217 at rochester.UUCP> ken at rochester.UUCP (Ipse dixit) writes:
>This alias swaps the top two directories on the stack - useful for
>directory hoppers like me:
>
>alias / 'set dirstack=`dirs -l`; popd; cd $dirstack[1]; pushd $dirstack[2]'
I've got an ever faster one, which doesn't require an alias:
pushd
with no arguments will swap the top two directories. You can even do
pushd +2
to swap (sort of) the top and second to the top.
--
Ken Turkowski @ CIMLINC, Menlo Park, CA
UUCP: {amd,decwrl,hplabs,seismo,spar}!turtlevax!ken
ARPA: turtlevax!ken at DECWRL.DEC.COM
More information about the Comp.sources.unix
mailing list