From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9572 invoked by alias); 5 May 2015 16:24:48 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 35036 Received: (qmail 10808 invoked from network); 5 May 2015 16:24:46 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 X-AuditID: cbfec7f5-f794b6d000001495-be-5548eeca0dff Date: Tue, 05 May 2015 17:24:03 +0100 From: Peter Stephenson To: Vinod KK , zsh-workers@zsh.org Subject: Re: Using zsh as a base for Network device CLI Message-id: <20150505172403.1282c23a@pwslap01u.europe.root.pri> In-reply-to: References: Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrLLMWRmVeSWpSXmKPExsVy+t/xa7qn3nmEGqy/Z2gxqbufyeJg80Mm ByaPnbPusnusOviBKYApissmJTUnsyy1SN8ugSvjW8MmxoKX3BVrHsU2MG7i7GLk5JAQMJG4 d6GZBcIWk7hwbz1bFyMXh5DAUkaJu4dWsUI4DUwSz67sYoFwtjJKbL38nA2khUVAVWL3sr3M IDabgKHE1E2zGUFsEQFTiWcnr7CC2MIC5hJXV+4Aq+EVsJeY9uQVmM0pECxx5eECJhBbSCBA 4squqewgNr+AvsTVv5+YIE6yl5h55QwjRK+gxI/J98BOZRbQkti8rYkVwpaX2LzmLTPEHHWJ G3d3s09gFJqFpGUWkpZZSFoWMDKvYhRNLU0uKE5KzzXSK07MLS7NS9dLzs/dxAgJ5K87GJce szrEKMDBqMTDu0PYI1SINbGsuDL3EKMEB7OSCO+eC0Ah3pTEyqrUovz4otKc1OJDjNIcLEri vDN3vQ8REkhPLEnNTk0tSC2CyTJxcEo1MK5QMv52YmLXokWrtt1nv39PdsbiiyuC1tvyXX2R PelOTtW6dQlndjd/Y3ukt/L2/NyN9dtyppXb3Lr0pviZo90e02dT/rz02FkowVAy9+2KI+w3 2T/8Tb56qXzS+6u9j4M3iz26opfjc3bx/hhbw9b3twW1Syx7FvF8Ds3iX8xTcexQ+Mqpq96W KbEUZyQaajEXFScCAMQF4i9gAgAA On Tue, 5 May 2015 11:00:43 -0400 Vinod KK 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