[arch-projects] grab, drop and clone

Oliver Burnett-Hall olly at burnett-hall.co.uk
Thu Mar 17 14:25:39 EST 2005

On Thu, 2005-03-17 at 13:16 -0600, Aaron Griffin wrote:
> > Somebody please tell me I'm not the first to think of this and that I
> > overlooked some simple bash built-in or pacman package... Its so
> > simple... but sometimes very useful.

> I think zsh may have something similar to this built in... not sure
> though... zsh is too complicated for my tastes

Heretic.  zsh is the answer to all your problems :)

I don't know of anything in zsh exactly like this, but you can just use
the ~<number> syntax to refer to directories in the directory stack
(I've a feeling this is standard ksh syntax too, so should work in bash

i.e. 'cp ~1/foo .' copies foo from the directory on the top of the stack
to the current directory.

- olly

More information about the arch-projects mailing list