Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Using zsh as a base for Network device CLI
- X-seq: zsh-workers 35036
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: Vinod KK <nadarji@xxxxxxxxx>, zsh-workers@xxxxxxx
- Subject: Re: Using zsh as a base for Network device CLI
- Date: Tue, 05 May 2015 17:24:03 +0100
- In-reply-to: <CAP0FPUO5BZMDt-ZxHAd7pmsd6rS7O_0aBC=4pSx4_ChKGnqimA@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Organization: Samsung Cambridge Solution Centre
- References: <CAP0FPUO5BZMDt-ZxHAd7pmsd6rS7O_0aBC=4pSx4_ChKGnqimA@mail.gmail.com>
On Tue, 5 May 2015 11:00:43 -0400
Vinod KK <nadarji@xxxxxxxxx> wrote:
> One of my current tasks is to move our device CLI to a standard shell, to
> exploit job control, piping and the rest of the good features. I have
> decided to use zsh for this purpose, as it seems to be the most extensive
> one, functionally.
>
> The main challenges in this is to
> 1. change the initial builtins to the commands that the device understands
> and
> 2. update completion to use the command syntax of the device.
>
> There is a bit of existing C code that parses the command syntax grammer
> that I would like to leverage.
>
> I had 2 questions regarding this:
>
> 1. Has something similar been attempted by anybody in this group?
> 2. What should be my initial design path, so that the solution fits in with
> zsh philosophy?
I'm not sure I understand the scope well enough to give any detailed
answer, but definitely the first think I'd suggest is creating a
loadable module with the builtins you require in it --- that will
definitely give you the cleanest interface. There are plenty of
examples in the Src/Modules directory with builtins. I wouldn't be shy
of providing special parameters if that's a more natural way of
exchanging certain forms of information, either.
There is some guidance in Etc/zsh-development-guide
Note you'll very likely still need the normal shell build tree --- the
mechanics of building a loadable module separately aren't very well
advanced.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author