On 16/05/13 19:44, Duncan Roe wrote:
> On Thu, May 16, 2013 at 12:56:18PM +1000, Toby Corkindale wrote:
>> On 16/05/13 12:34, Jason White wrote:
>>> Toby Corkindale <[email protected]> wrote:
>>>> I just wondered.. are there any terminals*, plugins for terminals, or
>>>> plugins for tmux, that will scan output and automatically send canned
>>>> responses -- whilst still letting me interact normally the rest of the
>>>> time?
>>>>
>>>> And secondly -- are there any tools that will simply let me assign
>>>> hotkeys or macros to be automatically typed upon being pressed?
>>> If you ultimately do have to script terminal sessions, the only tool I know
>>> of
>>> is expect. Here's the Debian package description.
>>
>> Thanks, however I'm aware of expect. It completely fails my requirement
>> that the terminal remain completely interactive.
>>
> Huh? You can & off expect scripts - no need to tie up the terminal.
No, I don't want to background the expect script! I mean I want to
retain direct control over the terminal, rather than have everything
being piped via an Expect script.
Since Erik asked, I'll restate my requirements in a different way, a-la
"user experience". Are there any X or Terminal apps that can achieve
this experience?
1) User clicks icon on desktop to launch terminal window.
2) Terminal window appears
3) User types arbitrary text, maybe running tmux and then sshing to a
remote machine.
4) The user accesses a menu on the system which brings up a list of
current macros and assigned hot-keys; the user enters in a new macro
("Qwerty"), assigned to the Alt-Q key combination. User closes menu.
5) User presses Alt-Q, and the phrase "Qwerty" appears in the terminal,
as if the user had actually typed it themselves.
The second/alternative requirements are:
5) User accesses either a menu or a configuration file, which has a list
of trigger phrases, and responses. User configures trigger phrase of
"hello" to have a response of "world!".
6) The phrase "hello" appears in the terminal as a result of the remote
application; the word "world" is then automatically entered into the
terminal as if the user had typed it themselves.
While I appreciate the various comments regarding Expect and how it
could be shoe-horned into this situation, please accept that it's not
the right tool and don't mention it further.
If what I'm after doesn't exist, that's fine; I just thought I'd ask the
community in case it did.
(So far, the screen/tmux macros look like the closest hit)
Cheers,
Toby
_______________________________________________
luv-main mailing list
[email protected]
http://lists.luv.asn.au/listinfo/luv-main