Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Substitution



Eric Mangold wrote:

On Sun, 17 Apr 2005 18:42:31 +0530, Saket Sathe <saket@xxxxxxxxxxxxx> wrote:

Eric Mangold wrote:

On Sun, 17 Apr 2005 18:32:56 +0530, Saket Sathe <saket@xxxxxxxxxxxxx> wrote:

Hi,
Suppose I've typed these commands:

# mv somefile1 /home/saket/stuff/books/
# acroread somefile.pdf
# mv somefile2 /home/saket/stuff/books/

How can I substitute the '/home/saket/stuff/books/' of the first command into the last command ?
Currently I just retype it again :(



I would push M-. twice. Assuming you have emacs bindings set as in "bindkey -e"

-Eric


Can '!:n' or something similar be used ? Or is '!:n' used only if you want arguments from the _last_ command.


That'll all be documented here: http://zsh.sunsite.dk/Doc/Release/zsh_13.html#SEC48

-Eric

Thanks :) got it..

--
Saket.

... It is better to be violent, if there is violence in our hearts, than to put on the cloak of nonviolence to cover impotence. - Mahatma Gandhi



Messages sorted by: Reverse Date, Date, Thread, Author