Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Using zle outside zsh
- X-seq: zsh-users 7908
- From: DervishD <disposable1@xxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Using zle outside zsh
- Date: Mon, 23 Aug 2004 17:59:51 +0200
- Mail-followup-to: Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: Pleyades
Hi all :)
First of all, I've changed my email address, although I can still
be contacted on the old address, just in case someone in the list
has it.
That said, let's go to the matter ;)
No, I'm not talking about getting zle out of zsh and reusing it
as a library. I asked that in the past and is very difficult, so I've
thought about other solution.
The scenario: we have a nice program we use a lot, and it's very
well coded, indeed. It is interactive, and takes its input from stdin
and outputs to stdout/stderr, but it lacks command line editing. It
uses the old stdio to read the user input, and we would like to have
command line editing, a fancy prompt, some kind of completion, a
couple of keyboard shorcuts or macros, a way of configuring
keybindings, etc...
A solution is to hack the program and write a nice command line
interpreter for it, or use libedit, libreadline or try to get the
functionality of zle and put in the program. But this requires time,
coding, etc. and maybe forking the project (assuming it is free
software, of course).
What I'm thinking is: will it be difficult to use zsh as the
command line interpreter? I mean, you run the program as:
program < fifoin > fifoout 2> fifoerr
and you configure zsh so it takes the command line (zle, full
edition, etc.) and instead of running it, writes it to 'fifoin',
while reads 'fifoout' and 'fifoerr' and dumps them on the screen.
I haven't though about how implementing all that, it's just an
idea that popped out a minute ago, when I needed to use a poor-man's
ftp client without command line editing because 'zftp' doesn't have a
'STAT' command (yes, I know, it has 'quote', I discovered it too
late)...
Thanks for your attention :) If anyone has ideas about a
solution, they're welcome. Of course, I'm don't want anybody to
implement this, I'll do that, I just want to know ideas, drawbacks,
etc.
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author