zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@zsh.org
Subject: Re: [PATCH v4] zsh localedef completion
Date: Tue, 14 Jun 2016 11:31:52 +0200	[thread overview]
Message-ID: <5312.1465896712@thecus.kiddle.eu> (raw)
In-Reply-To: <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


  reply	other threads:[~2016-06-14  9:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-02 15:17 Marko Myllynen
2016-06-14  2:07 ` Eric Cook
2016-06-14  9:31   ` Oliver Kiddle [this message]
2016-06-16  2:21     ` Eric Cook
2016-06-18 21:17       ` PATCH: allow default match specs to be disabled (was Re: [PATCH v4] zsh localedef completion) Oliver Kiddle
2016-06-19 16:18         ` Bart Schaefer
2016-06-20 14:13           ` Oliver Kiddle
2016-06-20 15:10             ` Peter Stephenson
2016-06-20 15:23               ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5312.1465896712@thecus.kiddle.eu \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).