zsh-workers
 help / color / mirror / code / Atom feed
From: Eric Cook <llua@gmx.com>
To: zsh-workers@zsh.org
Subject: Re: [PATCH v4] zsh localedef completion
Date: Mon, 13 Jun 2016 22:07:43 -0400	[thread overview]
Message-ID: <2aa4c678-6d5e-0614-7aff-e374c3108ba3@gmx.com> (raw)
In-Reply-To: <57504DEC.9000101@redhat.com>

Two minor things about this


> +      "(-u)"-u+'[specify target codeset]:codeset:_files'
> +    )
> +  [[ $OSTYPE == (freebsd*|dragonfly*) ]] && bsd_opts=(
> +      "(-D)"-D'[create BSD-style output]' \
> +      "(-U)"-U'[ignore undefined character symbols]' \
> +      "(-v)"-v'[verbose deguggin output]' \
> +      "(-w)"-w+'[specify width file]:width file:_files' \
> +    )
> +
> +  _arguments -A "-*" -C \
> +    "(-c)"-c'[force write despite of warnings]' \
> +    "(-f)"-f+'[specify locale charmap file]:charmap:->charmap' \
> +    "(-i)"-i+'[specify locale definition file]:locale file:_files' \

You don't have to specify the option itself in the exclusion list of the optspec,
compsys only completes an option once (normally).

A person normally includes the option in the exclusion list with a trick like
"(-v --verbose $exargs)"{-v,--verbose}'[display additional information]'

Because brace expansion will expand into two (shell) words
(-v --verbose $exargs)--verbose[display additional information] # and
(-v --verbose $exargs)-v[display additional information]

Which saves a bit of typing.


> +        _wanted values expl charmap compadd "$@" \
> +          -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.

Some examples being _git, _imagemagick, _graphicsmagick, _mtools, _whois
_mozilla, _netscape


  reply	other threads:[~2016-06-14  2:20 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 [this message]
2016-06-14  9:31   ` Oliver Kiddle
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=2aa4c678-6d5e-0614-7aff-e374c3108ba3@gmx.com \
    --to=llua@gmx.com \
    --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).