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

Re: foo=<TAB> always gives context array_value



Bart Schaefer wrote:

> On Apr 26, 10:26am, Sven Wischnowsky wrote:
> } Subject: Re: foo=<TAB> always gives context array_value
> }
> } @@ -555,7 +555,7 @@
> }  /* These are flags saying if we are completing in the command *
> }   * position, in a redirection, or in a parameter expansion.   */
> }  
> } -static int lincmd, linredir, ispar, linwhat;
> } +static int lincmd, linredir, ispar, linwhat, linarr;
> 
> OK, I have to ask ... what does the leading `l' stand for in all those
> names except `ispar'?

Historical reasons... most of them were `local' copies of the variables
without the `l' that were used elsewhere. Now, that's a bit stupid,
since `inarr' is used only in tricky.c, I didn't see the `ispar' and
wanted to make it consistent. But in a certain sense it is: those with 
the `l' are set when parsing is done (real parsing) and thus give a
hint where to look (well, at least for those who know the code). But
`ispar' is the flag set in `check_param()' which tests if we are
completing in a parameter expansion for the new style completion --
and doesn't have to do with *real* parsing.

It might be argued that we should rename `ispar' to `lispar' or rename 
`linarr' to `inarr', though. (Although the current state might help me 
to remember what's going on.)

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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