Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: minor annoyance with zsh and git flow



On Thu, May 26, 2011 at 02:22, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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.  This ...

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.



Messages sorted by: Reverse Date, Date, Thread, Author