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

Re: PATCH: completion for perldoc



Sven Wischnowsky (wischnow@xxxxxxxxxxxxxxxxxxxxxxx) wrote:
> 
> Adam Spiers wrote:
> 
> > Here's a completion system for perldoc.  It's my first stab at
> > completions with the new system, so be warned: you may need to change
> > some glaring mistakes.  If it's very wrong, let me know; OTOH if it's
> > OKish then maybe there's more where that came from.
> 
> Every attempt to write stuff for the new completion system is OKish.
> 
> > (Completion/User is the right place, right?)
> 
> Yes, but we somehow seem to have agreed (or `most of us...') to put
> everything for one command or suite of command into one function.

How would you define a suite of command exactly?  I assumed it would
be a function whose #compdef top line had many commands on it.  My
_perl* stuff has a #compdef line for the pm* commands from pmtools,
and a #compdef for perldoc, but I couldn't figure out how to squash
them all into one file.

> > Oh, and the zle -R bit doesn't work: it displays the text and then
> > immediately erases it.  No doubt this is some misunderstanding on my
> > part.
> 
> `zle -R' is intended for interactive functions (normal widgets). If
> you just want to display a message, use the function `_message'.
> 
> You may also want to have a look at `Etc/zsh-development-guide' and
> `Etc/Completion-style-guide' (the latter is not at all complete --
> I'll be thankful for every comment that helps improve it).

I noticed Etc/Completion-style-guide soon after posting and realised
the many problems with that _perl* :-(

I'll try to fix them and repost.

Finally, thanks Sven for such amazingly quick patches to the bugs I
reported.

Adam



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