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

Re: 4.3.13 changes



On Fri, 22 Jul 2011 13:13:49 +0200
Nikolai Weibull <now@xxxxxxxx> wrote:
> Can you please have a look at the '*:: :->file' problem that I’m
> having with _arguments (see _git-add in Completion/Unix/Command/_git)?
>  I need to know if this is a problem with _arguments or if I’m doing
> something wrong.  The gist of it is that options don’t complete after
> arguments if you use “::” instead of “:”.

I finally looked at this.  The documentation says

 With two colons before the message, the words special array and the
 CURRENT special parameter are modified to refer only to the normal
 arguments when the action is executed or evaluated.

I can't see any evidence not being able to complete options thereafter
is deliberate.  This is to do with the restrict_range() calls in
ca_set_data(), I think.  The :: causes the first argument to be
ca_laststate.argbeg instead of ca_laststate.optbeg, which fits the
descxription; I can't see any other intentional effect.  It's possible
there's some miscounting later, or something, but it looks obscure.

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



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