zsh-workers
 help / color / mirror / code / Atom feed
* Doc for compdef and #compdef is out of date
@ 2003-02-23  1:42 Bart Schaefer
  2003-02-25  9:37 ` Oliver Kiddle
  0 siblings, 1 reply; 5+ messages in thread
From: Bart Schaefer @ 2003-02-23  1:42 UTC (permalink / raw)
  To: zsh-workers

There's no mention of `#compdef -T ...' or of what that translates into
in the actual `compdef' command; there's also no mention of using a comma-
separated list of context names [as is described under the entry for the
`_complete' function].

I'd take a stab at documenting this, but it'd be better if somebody who
really knows what's going on there (Oliver?) would do it instead.

Also, there's an extraneous newline in the item(tt(#compdef) ...) line
which is causing the hanging tag on the paragraph to wrap incorrectly.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Doc for compdef and #compdef is out of date
  2003-02-23  1:42 Doc for compdef and #compdef is out of date Bart Schaefer
@ 2003-02-25  9:37 ` Oliver Kiddle
  2003-02-25 10:11   ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Oliver Kiddle @ 2003-02-25  9:37 UTC (permalink / raw)
  To: zsh-workers

On 23 Feb, Bart wrote:
> There's no mention of `#compdef -T ...' or of what that translates into
> in the actual `compdef' command; there's also no mention of using a comma-
> separated list of context names [as is described under the entry for the
> `_complete' function].

#compdef -T does not exist. See the first paragraph of 16795. And, I'm
not sure what you mean by a comma-separated list of context names unless
you just mean the -redirect-,op,command and -value-,name,command forms.

Looking over the documentation for _complete and compdef/#compdef, it
all looks complete and up-to-date to me. Much of _complete's
documentation covering contexts should perhaps be moved to where compdef
is documented so that _complete's documentation can focus on how it fits
in relative to _expand, _approximate and other completers while
documenting the contexts near compdef makes it more obvious that the
names used with compdef can be contexts as well as command names.

Only thing which does seem to be missing is the -N option from the
compdef synopsis. Other than that, I can't see what I could add to it.

And just something I noticed in _complete's documentation, does anyone
know what the point of the $compcontext additions in 12449 and 12483
were. Where might you set compcontext to an array? I can sort-of
understand the use in _nslookup but that is the only use.

Oliver

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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Doc for compdef and #compdef is out of date
  2003-02-25  9:37 ` Oliver Kiddle
@ 2003-02-25 10:11   ` Bart Schaefer
  2003-02-25 15:00     ` Oliver Kiddle
  0 siblings, 1 reply; 5+ messages in thread
From: Bart Schaefer @ 2003-02-25 10:11 UTC (permalink / raw)
  To: zsh-workers

On Feb 25, 10:37am, Oliver Kiddle wrote:
}
} #compdef -T does not exist. See the first paragraph of 16795.

OK, then it's the comment in Completion/Zsh/Context/_value that needs to
be updated, not the .yo files.

} not sure what you mean by a comma-separated list of context names unless
} you just mean the -redirect-,op,command and -value-,name,command forms.

That's exactly what I mean.  When I see that form in a Completion/** file,
I don't think to go looking under _complete for its definition ... so:

} Much of _complete's documentation covering contexts should perhaps be
} moved to where compdef is documented

Exactly.

} And just something I noticed in _complete's documentation, does anyone
} know what the point of the $compcontext additions in 12449 and 12483
} were. Where might you set compcontext to an array? I can sort-of
} understand the use in _nslookup but that is the only use.

Given that Sven wrote _nslookup, I'm pretty sure that the additions in
12449 and 12483 were specifically to support that one use.  He must have
thought it would be more generally interesting than it has turned out to
be ...


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Doc for compdef and #compdef is out of date
  2003-02-25 10:11   ` Bart Schaefer
@ 2003-02-25 15:00     ` Oliver Kiddle
  2003-02-25 16:22       ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Oliver Kiddle @ 2003-02-25 15:00 UTC (permalink / raw)
  To: zsh-workers

Bart wrote:

> OK, then it's the comment in Completion/Zsh/Context/_value that needs to
> be updated, not the .yo files.

> } Much of _complete's documentation covering contexts should perhaps be
> } moved to where compdef is documented
> 
> Exactly.

I've made these changes then. No patch because moving large blocks
results in a large patch with the moved text duplicated.

I'm not entirely sure about the position in the #compdef documentation
that I've put the special contexts in so let me know if you think it
can be further improved.

The last paragraph for _normal was also out-of-date so I removed it.

Oliver


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.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Doc for compdef and #compdef is out of date
  2003-02-25 15:00     ` Oliver Kiddle
@ 2003-02-25 16:22       ` Bart Schaefer
  0 siblings, 0 replies; 5+ messages in thread
From: Bart Schaefer @ 2003-02-25 16:22 UTC (permalink / raw)
  To: zsh-workers

On Feb 25,  4:00pm, Oliver Kiddle wrote:
}
} I've made these changes then.

Thanks ...

} I'm not entirely sure about the position in the #compdef documentation
} that I've put the special contexts in so let me know if you think it
} can be further improved.

I'd actually have put it inside the item(tt(#compdef) var(names...) ...)
section, but I recall that there are sometimes problems with nesting of
startitem() so it's probably fine where it is.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-02-25 16:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-23  1:42 Doc for compdef and #compdef is out of date Bart Schaefer
2003-02-25  9:37 ` Oliver Kiddle
2003-02-25 10:11   ` Bart Schaefer
2003-02-25 15:00     ` Oliver Kiddle
2003-02-25 16:22       ` Bart Schaefer

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).