From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4605 invoked by alias); 3 Jun 2011 00:50:00 -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: 29440 Received: (qmail 12728 invoked from network); 3 Jun 2011 00:49:57 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.161.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=0gSy7bSNrJeWl286b0sN4YFSq7fV62UoNFMcQkYCQLs=; b=Ln+NIAc2lKWiKgZNjD6BRI/9QTxk5XG3rpbPwztDeoN+SCjweh5D+EyqyfLjKYs/nc luu4fw38waUg2TcA7aHyZWm2G1xdN2qJ0ntBlkSKiNdqjXuv9QDG1McF10jSIajIhklS zxpqW0EQx09KWops8V4538Eoo/QajyOVTTAlc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type :content-transfer-encoding; b=XD0uQ8QuQjNdfsso5+5uuk5dVqO6f358gOX+UxL6SBvSfNVqGfNxfQiMdHyuewRTMh CkyPdmchIhH1zUiO9UXWh8hy6Ap46F+SD5+Rzz3F9QigBsf2va0vzgwX1IQu1UEtHgHE u7LRgq2YTIw4s+EPGgCNpbcwH9Gs3H0ym/+dY= MIME-Version: 1.0 From: Richard Hartmann Date: Fri, 3 Jun 2011 02:35:58 +0200 Message-ID: Subject: ENBF or similar for making zsh etc aware of a programs' syntax? (was: "Re: minor annoyance with zsh and git flow" on -users) To: zsh workers Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi all, moving to -workers and including full quote below. Basically, my idea was to define a generic syntax file for programs, potentially using ENBF. That could be used to (auto)build completions, colour the prompt, syntax-check commands and scripts, automated tests, automagic building/verification of piped commands and a ton of other things. Also, this could be shared between various programs. zsh is obviously my main concern, but I can see this being useful across various tools and programs. If upstreams were to maintain these definitions, all shells and other programs interacting with a piece of software would be able to always know what to send to and expect, eliminating version issues, etc. This should probably be coordinated via/pushed to freedesktop.org at some p= oint. I am poking this issue once again as I just stumbled across something that could also be solved by this approach: ~ % git config -l zsh: correct 'config' to '.config'? [N/y/a/e] a ~ % Feedback? Richard On Thu, May 26, 2011 at 13:16, Richard Hartmann wrote: > On Thu, May 26, 2011 at 02:22, Bart Schaefer = wrote: > >> Of course the root of all this is that "subcommands" are not a concept >> that unix-derived shells were ever designed to deal with. =C2=A0This ... > > You are raising an interesting point. Realistically speaking, love it > or hate it, this kind of syntax will only become more common over time > which means a way to deal with this generically would be helpful. > > Of course, this more or less requires zsh to actually know what > commands a program can understand and with what syntax. Part of this > information could be gleaned from completions, I guess. > > A different approach would be to define syntax files for commands > (EBNF?) which could be distributed with the programs themselves or at > least shared between shells. Dreaming some more, this could then even > be helpful for zsh's long-long-term possibility of syntax highlighting > capabilities.. > > > I'll stop babbling now, but the more I think about it, the more I > think it's an interesting idea... > > > Richard > > PS: If zsh, Bash, fish, you name it could generate their own > completion definitions from EBNF or similar, this could be a huge > boost to having current completions everywhere. > > PPS: And it could even solve the old "keep zsh's git completion in > git's git or zsh's" debate. > --=20 Richard