Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zle separability



    Hi Frederik :)

 * Frederik Eaton <frederik@xxxxxxxxxxxxxx> dixit:
> Thanks. I guess there's always writing a zsh script to do the
> interfacing, but that wouldn't be ideal.

    In fact I've tried to use zpty for building frontends to 'dumb'
programs that doesn't support history or line editing. I tried first
with a simple ftp client, since zftp has some problems for me. The
result is incomplete because I haven't had the time to do it.

> (... but, by the way, it would still be nice if such uses for zsh were
> better supported, with for instance support for reading an arbitrary
> config file or executing an arbitrary fragment before opening an
> interactive shell, or for a function which can be defined to handle
> all interactive commands)

    You already can open an arbitrary config file with zsh using
/etc/zshrc and $ZDOTDIR/.zshrc and a bit of magic (like an
environment variable). If you want, you can use '-c' too or '-s' to
read commands from stdin or from a file. Be careful about closing
stdin too soon or end your script when you shouldn't ;))

    If what you want is to run 'zsh --config=configfile', ok, there's
no support for that.

    For the rest I don't understand clearly what do you want. If you
could give me some use cases I can try to tell you ways of achieving
what you need.

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.dervishd.net & http://www.pleyades.net/
It's my PC and I'll cry if I want to...



Messages sorted by: Reverse Date, Date, Thread, Author