From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: "Matthias Kopfermann" <kopfermann@trio-hittfeld.de>,
"Zsh Users" <zsh-users@sunsite.auc.dk>
Subject: RE: --help trough _use_lo , but how with -h style?
Date: Wed, 28 Jun 2000 17:22:09 +0400 [thread overview]
Message-ID: <000e01bfe103$dcd6f650$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <20000628150234.A32686@linux-ws.kg-hittfeld.local>
I am not sure what do you mean. _use_lo simply does very general parsing
of 'command --help' output. But note, that --help is de facto standard
for GNU long options; and help format is more or less (actually, much
less :-) similar between commands. What you want is a function that
would parse general output of arbitrary command and generate useful
completion out of this. I doubt that it ever be possible.
Please, note, that as far as I can tell --help parsing is used only in
three completion functions currently - _configure, _tar and _gdb. Of
these three I believe that _tar and _gdb use it only for historical
reasons - the single command where this makes sense is _configure.
Note, that parsing of help text has many drawbacks. You cannot supply
description; you cannot define mutualy excluding options; you cannot
define mutually dependent options or option sets. I.e. _arguments is
much better suited - with the additional cost of writing separate
function for every command.
Are you aware about _arguments and it's possibilities?
-andrej
> -----Original Message-----
> From: Matthias Kopfermann [mailto:kopfermann@trio-hittfeld.de]
> Sent: Wednesday, June 28, 2000 5:03 PM
> To: Zsh Users
> Subject: --help trough _use_lo , but how with -h style?
>
>
> Hi again,
> After I got the information about the use of `compdef _use_lo
> x y z' to
> have x y and z commands completed I asked myself:
> How can i do it with these `-h' commands. e.g. mutt only wants
> -x flags. i would like to have such commands being completed just
> like the much nicer to read --x commands. is there a function
> already for these kind of commands? (I am not talking about a
> specific mutt completion though that may be nice, too.)
>
> BTW: i used to use perl for having --help commands being
> completed and i have a function that does it with -h commands ,
> too, but it would be much nicer, if there was such a function in
> plain-zsh already. Thats why i ask.
>
> --
> And in the end the love you take
> is equal to the love you make
> THE BEATLES
>
>
next prev parent reply other threads:[~2000-06-28 13:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-06-28 13:02 Matthias Kopfermann
2000-06-28 13:12 ` Sven Wischnowsky
2000-06-28 13:22 ` Andrej Borsenkow [this message]
2000-06-28 15:56 ` Bart Schaefer
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='000e01bfe103$dcd6f650$21c9ca95@mow.siemens.ru' \
--to=andrej.borsenkow@mow.siemens.ru \
--cc=kopfermann@trio-hittfeld.de \
--cc=zsh-users@sunsite.auc.dk \
/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).