Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH v4] zsh localedef completion
- X-seq: zsh-workers 38678
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH v4] zsh localedef completion
- Date: Tue, 14 Jun 2016 11:31:52 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1465896713; bh=kT9SeNCz3ISsF9qyUFesV18Jjf/uC+WUro2W1I8lENo=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=cIHHJ0/2YQFXZwgkW1aTAn6pUw/O4vucCY/3+WMTMPwwp8UjFiJe0SElAJDxyGdxVoRtCzYporw675r8OE1ZQtYYMVtnHVtHf6CJ+b1f16jKszASmhfvklbZA3v3PBQNKQ47wS5+fR9ieqKh80+xaZ8Y+4uGpeY2kcuhf3RIPBY74oPGTL5zy6NP8YiM48w0SXrD6Yjx/cq64xc2c+zq0lFaesnKU6kmvqtx3L5NvBorM600vDQnhjvFya+srKlBevZS+DcbhVLgFCiQf8zQUi8rAac5ov9ycg4jwiLkyaPR7kulmZKoBDi40PgsXkeYye/YHPzLsnEhaW7FnVFG8w==
- In-reply-to: <2aa4c678-6d5e-0614-7aff-e374c3108ba3@gmx.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <57504DEC.9000101@redhat.com> <2aa4c678-6d5e-0614-7aff-e374c3108ba3@gmx.com>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author