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

Re: change in zstyle file-patterns handling between 5.5.1 & 5.6(.2)?



dana wrote on Mon, 17 Sep 2018 00:58 -0500:
> On 16 Sep 2018, at 21:27, Takeshi Banse <thb@xxxxxxxxx> wrote:
> >If I revert the commit 6b4e78dce6a505d8dab5554d9925e38e13bb40ea like
> >a workaround diff hunk at the end of this mail, it works here for these
> >2 particular issues.
> 
> I guess this one is mine, sorry. :/
> 
> Going back over it, i'm having trouble remembering exactly why i changed _files;
> as far as i know, it's not necessary to fix the _object_files problem i found.
> Maybe during troubleshooting i noticed that the one _path_files call was
> different from the other two in that function, and i decided it was a mistake?
> Sounds like the kind of dumb thing i'd do.
> 
> Unless someone else can figure out what past-me was going for, i'm in favour of
> reverting that half of the change per your patch.

Should the order of "$@" and "${(@)expl}" in the _object_files part of
that patch be reversed?

In general, the parameters should be ordered so a function's caller has
an opportunity to override defaults set by the function; so options in
"$@" should be placed so as to override those in "$expl[@]".

I'm not sure, however, what that means in practice.  I *thought* that in
compadd, when an option flag is repeated its last occurrence wins, but
'compadd -ld foo -d bar' uses $foo, not $bar...

Cheers,

Daniel



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