monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] Re: addition to zsh completion


From: Bruce Stephens
Subject: [Monotone-devel] Re: addition to zsh completion
Date: Mon, 25 Sep 2006 20:52:05 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Thomas Moschny <address@hidden> writes:

> On Thursday 21 September 2006 23:23 Bruce Stephens wrote:
>> _mtn_selector_or_revision combines _mtn_selectors and _mtn_revisions,
>> and the patch changes all uses of _mtn_revisions to use
>> _mtn_selector_or_revision.
>
> Do really all commands except selectors instead of revision ids? The automate 
> commands for example don't (but they are currently not completed anyway).

I believe so (except for the automate commands, and complete).  I may
be wrong, I didn't check that thoroughly.  (I use selectors quite a
bit, and I've never found a case (apart from automate) where one
wasn't accepted.)

>> -q_mtn_tag() {
>> +_mtn_tag() {
>
> Ups :) Thanks for correcting that.
>
>> +(( $+functions[_mtn_selectors] )) ||
>> +_mtn_selectors() {
>> +    local context state line
>> +    typeset -A val_args
>
> Do we need the last two lines? After reading the manual (which is
> not *that* clear) I thought something like that would only be
> needed, "when using an action of the form ‘->string’".

Not sure.

Rereading the documentation I think you're right, I think I misread
it.  For the record, it goes:

     [...] Hence the function calling _values should declare the local
     parameters state, line, context and val_args:

          local context state line
          typeset -A val_args

     when using an action of the form `->STRING'.  With this function
     the context parameter will be set to the name of the value whose
     argument is to be completed.

I didn't notice that the "when using an action..." obviously follows
directly on.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]