[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to use "process"?
From: |
Gerald Young |
Subject: |
Re: how to use "process"? |
Date: |
Mon, 15 Jun 2009 23:11:01 -0500 |
User-agent: |
KMail/1.9.9 |
On Monday 15 June 2009 17:02:23 clemens fischer wrote:
> Would it be true to say that "process" is like "stuff", but it handles
> text in registers instead of literal text?
Yes, but "process" handles the text "as if it had been typed in from the
user’s keyboard." Keep that in mind.
> 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?
How would you evaluate the contents of the register as screen command doing it
manually?:
- Press Ctrl+A (or whatever you have you escape key set to)
- Press ":" (colon) key
- Type in: eval 'echo text one' 'sleep 3' 'echo text 2'
- Press Enter
With "process" is the same, just that you use some special notation for some
keys:
register r "^A:eval 'echo text one' 'sleep 3' 'echo text 2'^M"
The same steps as above:
- ^A (screen parses this as a Ctrl+A)
- ":" (colon)
- eval 'echo text one' 'sleep 3' 'echo text 2'
- ^M (screen parses this as Enter)
Or you could insert a literal "Ctrl+A" or "Enter" by typing "Ctrl+V , Ctrl+A"
or "Ctrl+V , Ctrl+A". That works within vim or bash shell (probably not in a
gui editor).
Note how these literals are displayed "^A" and "^M". So if you need other
special keys, you can do the "Ctrl+V , ..." sequence at a bash shell to find
out how to type that key in screen commands.