From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3570 invoked by alias); 14 Jun 2016 02:20:37 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 38677 Received: (qmail 20510 invoked from network); 14 Jun 2016 02:20:36 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.1 Subject: Re: [PATCH v4] zsh localedef completion To: zsh-workers@zsh.org References: <57504DEC.9000101@redhat.com> From: Eric Cook Message-ID: <2aa4c678-6d5e-0614-7aff-e374c3108ba3@gmx.com> Date: Mon, 13 Jun 2016 22:07:43 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <57504DEC.9000101@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:rEQ2rkYCt3g924oZcYMdd+4aqkXdlbW9VCH0+Qcu80JQexWgwQ7 zmdgHQs4ptBsfBR3Xlt5qY2N1R6VoXPTH29/mEzB807Bi71EUkcwGk6s8yBGLsYI7e6eRay 5F6Scb/ys9T9BkA64vG3jAVVH5lTH2hI7RWfreaq7G6i2SzrcoLhiKHvgRJsvSDxm2mIK6X se24qQqVbitJwdPL207yQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:TQ91OA5ov2c=:VsFM+SxyztxsxvBAAT1oKt qMoqdx7buhJpKCjzb9ZDNq4Zr34UO/pOvqb4ZNIZi6+xpPzZLhoXAlDzWvoQzzAC7E5883asX hafgg52SGB8phynQ9P8LGdT70mjnn3qsetZrGwfjgF0EXdd1rtAnX/wCzyU6mGWaVD3OiPVtO kwZsbF4zxJD8+hUJivixvQEJ6qkpLZpRnkZ6E6QGqYYJ2ec4jaqBRgfieoAhMduXSUTLqdwnI ElIV0/yjsZ12V5qnwkZQM60VmRlmFeI6kACLpCWPYNkIZnIX8MQu4DM6Qr1HGZT6lZAvFhfCq qiUxv/MYiLowsV/jJluEtlMobZFAwWqG7qJAXW1DX0rJUgFyjeS5j1jjABf+DbKr+P8nIWtrd KUFiuNZ43+Hr67Ve8EuI5XShNkn7UFrLD4Ei/TtfTnDDRABXH5vLzeL4YWe6q2KlrnktGV6zE iNUl2+x/eW8aRLF+rKFqZztA/VMqhLcVFlnXWDNr5b/vQgLw9ibxoewLiBrVlUq/nQHcSmwVg eCL+5kqNhA4ifX3lHrlqJNQ1i98XWER6foZmnLL3AjcJqo2M04YquNqWdM3+j4vsQh+cUcDjX UKyKkO3HPApbZ3Zj+uQJcPsWd8f1wnd2VRuhYeI0hzejmTBupshgF42RJHuwLiswWmDoTax3f DCRIwBnuaf/+iNJhWrcPW3ZmmQmPbk/5S4LT7jpX3HzNfFMLuStCOkseNr2fQ1EZ8jdfNJF4k i2oOVNqqqWLIbTKkuaM+e1Ww+5iz5PvtiM07g8//26Sv03LdKRdkq79jNyZTkhm3Vva3ViHKP Onl71Gr 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