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

Re: pushing a string in the cut&paste stack



On 4/16/07, Andy Spiegl <zsh.Andy@xxxxxxxxx> wrote:
Hi Giulio,

> I would like to know how can I push a string in the cut&paste stack of
> zle. In practice, I would like to have a shell function, name it
> "copythis", such that
>
> >copythis "blabla"

Maybe I am overlooking something obvious but why don't you just "kill" the
blabla with alt-d?  Then it's in the killring for later usage.  Typing
copythis and quotes seems a lot more complicated to me.

Hi Andy,
you are right, my example was silly :-)  I choose it only for
simplicity. Actually I'm going to use Peter's suggestion to put the
output of a program in the shell killring, something like

myprogram | copythis

of course in this case copythis should be something like

copythis() { copy_this=`cat -` }

But if you know a better mechanism to do the same, I'm eager to learn!

Ciao,
Giulio.

P.S.: In any case, what about

copythis "bla $TERM bla"

?


--
Giulio Bottazzi <giulio.bottazzi@xxxxxxxxx>
http://giulio.bottazzi.googlepages.com
PGP Key ID:BAB0A33F



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