zsh-users
 help / color / mirror / code / Atom feed
* Using zle outside zsh
@ 2004-08-23 15:59 DervishD
  2004-08-23 16:07 ` DervishD
  2004-08-23 17:19 ` Bart Schaefer
  0 siblings, 2 replies; 11+ messages in thread
From: DervishD @ 2004-08-23 15:59 UTC (permalink / raw)
  To: Zsh Users

    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/


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2004-08-24 19:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-23 15:59 Using zle outside zsh DervishD
2004-08-23 16:07 ` DervishD
2004-08-23 17:19 ` Bart Schaefer
2004-08-23 18:25   ` DervishD
2004-08-23 19:46   ` DervishD
2004-08-23 21:47     ` Bart Schaefer
2004-08-24  9:39       ` DervishD
2004-08-24 15:43         ` Bart Schaefer
2004-08-24 17:05           ` DervishD
2004-08-24 19:05             ` Bart Schaefer
2004-08-24 19:32               ` DervishD

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).