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

"expanding" to copy-earlier-word



I've bound ctrl-j to copy-earlier-word, so I can copy the last word
of the previously executed command line to the current command
line.  Is there a way to do the same as part of the expansion
process?

What I'd like to have this something like this:

  $ make foo
  $ ./<copy-earlier-word>

or even

  $ make foo; ./<copy-earlier-word>

(where "<copy-earlier-word>" stands for something to be expanded
to the previous word, i.e. "foo").

In the shell history the command should be stored before expansion
takes place.

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt
IBM Germany



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