Subject: Re: [PATCH v4] zsh localedef completion
From: Oliver Kiddle <[email-masked]>
To: [email-masked]
Date: Tue, 14 Jun 2016 11:31:52 +0200
List-Id: Zsh Workers List <zsh-workers.zsh.org>

Eric Cook wrote:
>
> > +        _wanted values expl charmap compadd "$@" \

The tag should probably be charmaps rather than values and "$@" is
superfluous given this is function is not intended to be called from
others.

> > +          -M 'm:{a-zA-Z}={A-Za-z} r:|-=* r:|=*' \
> > +          -a - charmaps && ret=0
>
>
> Also, what is the list's opinion of an completer forcing case insensitivity?
> Its a option the user normally have control over but after checking Completion/,
> i notice a few non-utility functions also do so.

If whatever is being completed is treated case-insensitively by whatever
program recieves it then it makes sense for the completion to also be
case-sensitive. So as long as localedef is as happy with utF-8 as with
UTF-8 then this would seem good.

The same argument doesn't quite apply to the r: specs: localedef isn't
going to accept U-8 as a shorthand for UTF-8. I would still include it
in cases where the matches are composed of - separated components,
however, even if for no other reason than to preserve and convey that
information in the function definitions.

It could perhaps be made easier to disable hard coded match specs with
a style. Currently it isn't too easy: compadd will accept multiple -M
options and concatenate them so that all apply. In the _wanted example
above, you get specs from the matcher style first, then matcher-list,
then anything in "$@" and finally the hard coded list. Perhaps we could
allow a special token in match specs that would cause subsequent specs
to be ignored or filtered?

Oliver