screen-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to use "process"?


From: Micah Cowan
Subject: Re: how to use "process"?
Date: Mon, 15 Jun 2009 21:37:12 -0700
User-agent: Thunderbird 2.0.0.21 (X11/20090318)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

clemens fischer wrote:
> On Thu-2009/04/30-16:47 clemens fischer wrote:
> 
>> Recently I needed a screen command sequence more complex than the
>> usual key "bind" or "stuff".  I turned to "process [key]", as the man
>> page said: "command can be used to bind multiple actions to a single
>> key".
> 
> Would it be true to say that "process" is like "stuff", but it handles
> text in registers instead of literal text?

It's like stuff, except it sends it as input to screen, and not the
shell (and uses registers).

>> And while we're at it:  how do I quote the individual commands of an
>> "eval"?  Say I want to "register" several commands.  I tried
>>
>>  register r "eval 'sth1 arg1' 'sth2 arg2'"
> 
> say I have:
> 
>   register r "eval 'echo text one' 'sleep 3' 'echo text 2'"
> 
> is there a way to evaluate this register as screen commands?

Hm, it's more like:

  register r ^ac^aA
  process r

to create a new screen and prompt for its title (that is, to type
exactly the keys  necessary to accomplish that).

You could do

  register r "^a:eval 'echo text one' 'sleep 3' 'echo text 2'^m"
  process r

for what you wanted... but then you could just as easily do the eval
command by itself. :)

- --
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer.
Maintainer of GNU Wget and GNU Teseq
http://micah.cowan.name/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEUEARECAAYFAko3IXgACgkQ7M8hyUobTrFeCgCePfskYb+OATXEScAq5vu7VRMB
ujMAl0ReQbC6AlIgLST8FmsMhO0lpjk=
=XGB8
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]