zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@sunsite.dk
Subject: Re: PATCH: expl not always local
Date: Mon, 06 Jun 2005 19:26:54 +0200	[thread overview]
Message-ID: <22953.1118078814@trentino.groupinfra.com> (raw)
In-Reply-To: <1050602170247.ZM12815@candle.brasslantern.com>

On 2 Jun, Bart wrote:
> 
> In part this is because the inner workings of the completion system are
> so sketchily documented.  The Doc/compsys.yo entry for _wanted, for example,
> doesn't use "local expl" in its examples, and none of the documentation is
> clear that the name "expl" is merely a convention for the second argument
> of things like _request/_wanted/_next_label/etc. (i.e., any other name
> ought to do just as well, but probably won't).

In one form of _arguments' specifications, expl is literally used and is
not a convention. I think the same applies for _regex_arguments.

However, quoting from the _description documentation:

    The resulting options for compadd are put into the array named
    /name/ (this is traditionally `expl', but this convention is
    not enforced).

Documentation for the various other functions such as _wanted are mostly
fairly clear that _description is called for the descriptions.

As you point out, the documentation does omit to declare expl local in
the _wanted example. It might have been better if _wanted declared expl
local itself and didn't require it as a parameter. However the patch
below fixes the documentation.

Relying on other Type/ functions to return stuff in expl seems like a
weird thing to do. Can you really find any example? Reviewing the
calling contexts would be useful but as one step to cleaning up the
functions, I'd happily see Doug's change included.

Oliver

Index: Doc/Zsh/compsys.yo
===================================================================
RCS file: /cvsroot/zsh/zsh/Doc/Zsh/compsys.yo,v
retrieving revision 1.181
diff -u -r1.181 compsys.yo
--- Doc/Zsh/compsys.yo	28 May 2005 04:26:58 -0000	1.181
+++ Doc/Zsh/compsys.yo	6 Jun 2005 17:20:51 -0000
@@ -4370,7 +4370,8 @@
 Hence to offer only one tag and immediately add the corresponding
 matches with the given description:
 
-example(_wanted tag expl 'description' \ 
+example(local expl
+_wanted tag expl 'description' \ 
     compadd matches...)
 
 Note that, as for tt(_requested), the var(command) must be able to


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.


  parent reply	other threads:[~2005-06-06 17:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-02 13:25 Doug Kearns
2005-06-02 15:28 ` Bart Schaefer
2005-06-02 16:44   ` Oliver Kiddle
2005-06-02 17:02     ` Bart Schaefer
2005-06-06 13:33       ` Doug Kearns
2005-06-06 16:24         ` Bart Schaefer
2005-06-06 17:26       ` Oliver Kiddle [this message]
2005-06-07 14:38     ` Oliver Kiddle
2005-06-06 13:33   ` Doug Kearns

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=22953.1118078814@trentino.groupinfra.com \
    --to=okiddle@yahoo.co.uk \
    --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).