From: Borzenkov Andrey <Andrey.Borzenkov@siemens.com>
To: "'zsh-workers@sunsite.dk'" <zsh-workers@sunsite.dk>
Subject: Passsing descriptions down in completion functions
Date: Thu, 9 Jan 2003 16:17:07 +0300 [thread overview]
Message-ID: <6134254DE87BD411908B00A0C99B044F04D68E65@MOWD019A> (raw)
Either I do not understand something basic or it does not work (and probably
has never working really).
Simple example.
bor@itsrm2% functions _foo
_foo () {
_arguments -s "-p[some option]:argument for this option:_hosts"
}
bor@itsrm2% compdef _foo foo
bor@itsrm2% foo -p TAB
bor@itsrm2% foo -p D248H032
Completing host
^^^^ should it not be "argument for that option"?
D248H032 GH4090Y0 anyhost
...
It is clear what happens:
+_arguments:340> _hosts -J option-p-1 -X '%BCompleting argument for this
option%b'
this sounds good, but later on ...
+_all_labels:37> compadd -J hosts -X '%BCompleting host%b' -M
'm:{a-zA-Z}={A-Za-z} r:|.=* r:|=*' -J option-p-1 -X '%BCompleting argument
for this option%b' -a hosts
Oops, description is now lost.
Quoting documentation:
If the ACTION starts
with a space, this list of words will be invoked unchanged,
otherwise it will be invoked with some extra strings placed after
the first word which can be given as arguments to the compadd
builtin command and which make sure that the MESSAGE given in the
description will be shown above the matches.
So, is it a bug or not?
-andrej
next reply other threads:[~2003-01-09 13:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-09 13:17 Borzenkov Andrey [this message]
[not found] ` <32149.1042120127@finches.logica.co.uk>
2003-01-09 14:04 ` Oliver Kiddle
2003-01-09 15:09 ` Borzenkov Andrey
2003-01-09 16:11 ` Oliver Kiddle
2003-01-09 16:26 Borzenkov Andrey
2003-01-09 17:09 ` Oliver Kiddle
2003-01-10 8:10 ` Borzenkov Andrey
2003-01-14 15:43 ` Oliver Kiddle
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=6134254DE87BD411908B00A0C99B044F04D68E65@MOWD019A \
--to=andrey.borzenkov@siemens.com \
--cc=zsh-workers@sunsite.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).