zsh-workers
 help / color / mirror / code / Atom feed
* Using zsh as a base for Network device CLI
@ 2015-05-05 15:00 Vinod KK
  2015-05-05 16:24 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Vinod KK @ 2015-05-05 15:00 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 731 bytes --]

Hi,

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?

Thanks
Vinod

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

* Re: Using zsh as a base for Network device CLI
  2015-05-05 15:00 Using zsh as a base for Network device CLI Vinod KK
@ 2015-05-05 16:24 ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2015-05-05 16:24 UTC (permalink / raw)
  To: Vinod KK, zsh-workers

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


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

end of thread, other threads:[~2015-05-05 16:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-05 15:00 Using zsh as a base for Network device CLI Vinod KK
2015-05-05 16:24 ` Peter Stephenson

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).