zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Vinod KK <nadarji@gmail.com>, zsh-workers@zsh.org
Subject: Re: Using zsh as a base for Network device CLI
Date: Tue, 05 May 2015 17:24:03 +0100	[thread overview]
Message-ID: <20150505172403.1282c23a@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <CAP0FPUO5BZMDt-ZxHAd7pmsd6rS7O_0aBC=4pSx4_ChKGnqimA@mail.gmail.com>

On Tue, 5 May 2015 11:00:43 -0400
Vinod KK <nadarji@gmail.com> 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


      reply	other threads:[~2015-05-05 16:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-05 15:00 Vinod KK
2015-05-05 16:24 ` Peter Stephenson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150505172403.1282c23a@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --cc=nadarji@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).