From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18312 invoked by alias); 12 Aug 2015 14:54:07 -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: 36127 Received: (qmail 18496 invoked from network); 12 Aug 2015 14:54:05 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1439390839; bh=BGtvNVhAYtyRwX/1spCgjkr1LMhLwPIbxps3ohKmTr8=; h=From:To:Subject:Date:From:Subject; b=g0pv2WmMiCdcyGZnT6xfzgPjxojmXBMiGCcqlLi6s+MpLRAqOPBeGUG/0W6z+EoLrFwAcaBXTjq2eB2qX7RjEWPmZ2J6NDbmwbC/KO6D0znE8FnL1du2LJlyErbSC0zeyjl9IuZtm8eREgzgVtwEhyzb4crLlEkiN2VGifyjldonva6zo9Cp55bJc8r2UysJZ1HbQNBGS6hyESsdV5ovI1jgkFaTN0yJp+G4HPRm+DKGCxnMqGcfHTvi0RCIE7r82bnrAHf6dv3nKZ8Gx+6Bs13d22gRZhEELeUwBcumPSS8FooBSUexbqz56SpJAS3XZ1u04YzmjbpZL87WPoq33w== X-Yahoo-Newman-Id: 88660.83855.bm@smtp139.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Awjvbm0VM1neVk_NoVf90a18bkCCg7P2grremGUF7mR2Q08 3ZHyBXioYmItJooQ4EpyyY1NhirNSIRvU7OLqPCBVdtif2jEWmd4S.wkCTKX aoo7YycigsA0aWir6ItVGQRt_B60mZGjSsdKcgqbmJMLs5TUcDFvTFd1y4SK tFTIfZktg6xAfTT0PMNU0rfspFaWmrSDZpe8ep77SXuFv1d4ckMcUJDXzcHs HFLHOa8N_fe47YW.3ZwVoDLMFWomoewpYv1_rSNQl3tMAs5xm.kVzX1FOSd3 aXPsxzYuZxBu2PrSaKgOmsRpI0fY2OkgC1UiuGKpQ31zcN8Mc1cEXNj59RSf eODs0ilZEqxTc5J9PKEy3Ec13S2QRS5EjCkJv3Rvlp9VCwGdE8966y62hF.x 78AB6qQCOGTkD3eGXR1v4sxxhczzNRDHr8F9OLUvjMFcskcVj0dD1e5sT0qZ IRkOjFnISmtGwtLcbZVnZTMuatjyl5ucN.EsmmB08m0Jn34faIIvSi5tRR3x vjYjOSIkYUqx3fY_Etw.W4IAZeBQ_iA-- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- From: Oliver Kiddle To: Zsh workers Subject: PATCH: assorted minor completion function changes MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4140.1439390837.1@thecus.kiddle.eu> Date: Wed, 12 Aug 2015 16:47:18 +0200 Message-ID: <4141.1439390838@thecus.kiddle.eu> This is an assortment of trivial changes that were sitting in my git repository, some since quite some time ago. There's a missing (-.) qualifier, a couple of -s options to _arguments. _vim completing for exim isn't helpful when exim is the MTA and not some vim version of ex that I've never seen anywhere with the name exim. nmh has gained a few extra commands. Oliver diff --git a/Completion/Unix/Command/_clay b/Completion/Unix/Command/_clay index 71f05bf..581338b 100644 --- a/Completion/Unix/Command/_clay +++ b/Completion/Unix/Command/_clay @@ -38,5 +38,5 @@ _arguments -C \ "-e:compile and run (implies -run)" \ "-M-:import .*; for -e" \ "-v[display version info]" \ - ":program file:_files -g '*.clay'" + ":program file:_files -g '*.clay(-.)'" diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git index 5b78a2b..7b59d00 100644 --- a/Completion/Unix/Command/_git +++ b/Completion/Unix/Command/_git @@ -5188,7 +5188,7 @@ _git_commands () { local -a aliases __git_extract_aliases local cmdtype len dup sep - local -a allcmds allmatching alts disp + local -a allcmds allmatching alts disp expl zstyle -s ":completion:${curcontext}:" list-separator sep || sep=-- for cmdtype in $cmdtypes aliases; do @@ -5202,7 +5202,8 @@ _git_commands () { allcmds+=( ${(P)${:-${cmdtype}_m}} ) done zstyle -T ":completion:${curcontext}:" verbose && disp=(-ld '${cmdtype}_d') - compadd -O allmatching -a allcmds + _description '' expl '' # get applicable matchers + compadd "$expl[@]" -O allmatching -a allcmds len=${#${(O)allmatching//?/.}[1]} # length of longest match for cmdtype in aliases $cmdtypes; do local -a ${cmdtype}_d diff --git a/Completion/Unix/Command/_ifconfig b/Completion/Unix/Command/_ifconfig index 49b0188..0c81bce 100644 --- a/Completion/Unix/Command/_ifconfig +++ b/Completion/Unix/Command/_ifconfig @@ -65,7 +65,7 @@ esac _arguments -C "$args[@]" \ '-a[apply to all interfaces]' \ - '1:network interface:_net_interfaces' \ + '1:network interface:_net_interfaces -r ": \t\n\-"' \ '::address family:(atalk ether inet inet6 ax25 ddp ipx netrom)' \ '*:option:->options' && ret=0 diff --git a/Completion/Unix/Command/_kvno b/Completion/Unix/Command/_kvno index 285aab3..782d9e6 100644 --- a/Completion/Unix/Command/_kvno +++ b/Completion/Unix/Command/_kvno @@ -11,8 +11,7 @@ _arguments -C \ ':principal:->principal' && ret=0 if [[ $state = principal ]]; then - if [[ -prefix host/ ]]; then - compset -P host/ + if compset -P host/; then _hosts && ret=0 else _alternative \ diff --git a/Completion/Unix/Command/_mh b/Completion/Unix/Command/_mh index 4817798..3eddd41 100644 --- a/Completion/Unix/Command/_mh +++ b/Completion/Unix/Command/_mh @@ -1,4 +1,4 @@ -#compdef ali anno burst comp dist flist flists folder folders forw inc mark mhlist mhmail mhn mhparam mhpath mhshow mhstore msgchk next packf pick prev refile repl rmf rmm scan show sortm whom +#compdef ali anno burst comp dist flist flists fmttest folder folders forw fnext fprev inc mark mhfixmsg mhlist mhmail mhn mhparam mhpath mhshow mhstore msgchk new next packf pick prev refile repl rmf rmm scan show sortm whom if [[ -z $commands[mhpath] ]]; then _message "MH commands are not available" @@ -73,7 +73,9 @@ elif [[ $service = mhparam ]]; then elif [[ $service = ali ]]; then _email_addresses -n MH elif compset -P '*:'; then - _message -e number 'number of messages' + _alternative \ + 'sequences:sub-sequence:(first last cur prev next)' + 'number: : _message -e number "number of messages"' else # Generate sequences. local foldnam folddir f sequences mhneg ret=1 @@ -95,6 +97,7 @@ else sequences=( ${${(f)"$(mark $foldnam 2>/dev/null)"}%%:*} ) mhneg="$(mhparam Sequence-Negation)" && sequences=( {,$mhneg}$^sequences ) sequences+=( all first last prev next ) + [[ $service = mhpath ]] && sequences+=( new ) _tags sequences while _tags; do while _next_label sequences expl sequence; do diff --git a/Completion/Unix/Command/_rm b/Completion/Unix/Command/_rm index 4728ad4..4d0dbdb 100644 --- a/Completion/Unix/Command/_rm +++ b/Completion/Unix/Command/_rm @@ -40,7 +40,7 @@ fi local curcontext=$curcontext state line ret=1 declare -A opt_args -_arguments -C $opts \ +_arguments -C -s $opts \ $args && ret=0 case $state in diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh index b7b7e41..c2514a1 100644 --- a/Completion/Unix/Command/_ssh +++ b/Completion/Unix/Command/_ssh @@ -105,7 +105,7 @@ _ssh () { ;; ssh-keygen) cmds=( -p -i -e -y -c -l -B -D -U ) - _arguments \ + _arguments -s \ '-q[silence ssh-keygen]' \ "($cmds -P)-b[specify number of bits in key]:bits in key" \ "($cmds -P)-t[specify the type of the key to create]:key type:(rsa1 rsa dsa ecdsa ed25519)" \ diff --git a/Completion/Unix/Command/_stty b/Completion/Unix/Command/_stty index f40cd85..b5545eb 100644 --- a/Completion/Unix/Command/_stty +++ b/Completion/Unix/Command/_stty @@ -14,5 +14,5 @@ else parmrk inpck istrip inlcr igncr icrnl iuclc ixon ixany ixoff \ imaxbel isig icanon xcase echo echoe echok echonl noflsh \ tostop echoctl echoprt echoke flusho pending iexten opost \ - olcuc onlcr ocrnl onocr onlret ofill ofdel + olcuc onlcr ocrnl onocr onlret ofill ofdel raw sane fi diff --git a/Completion/Unix/Command/_vim b/Completion/Unix/Command/_vim index 007671b..dbc946c 100644 --- a/Completion/Unix/Command/_vim +++ b/Completion/Unix/Command/_vim @@ -1,4 +1,4 @@ -#compdef vim exim gvim gex gview nvim rvim rview rgvim rgview evim eview vimdiff gvimdiff +#compdef vim gvim gex gview nvim rvim rview rgvim rgview evim eview vimdiff gvimdiff (( $+functions[_vim_files] )) || _vim_files () { diff --git a/Completion/Unix/Type/_pdf b/Completion/Unix/Type/_pdf index 60cee84..5fda42a 100644 --- a/Completion/Unix/Type/_pdf +++ b/Completion/Unix/Type/_pdf @@ -1,4 +1,4 @@ -#compdef pdf2dsc pdf2ps pdfimages pdfinfo pdftopbm pdftops pdftotext pdfopt pdffonts kpdf apvlv epdfview +#compdef pdf2dsc pdf2ps pdfimages pdfinfo pdftopbm pdftops pdftotext pdfopt pdffonts kpdf apvlv epdfview mupdf local expl ext='' diff --git a/Completion/Zsh/Context/_brace_parameter b/Completion/Zsh/Context/_brace_parameter index 4097895..9eb3465 100644 --- a/Completion/Zsh/Context/_brace_parameter +++ b/Completion/Zsh/Context/_brace_parameter @@ -152,7 +152,7 @@ if [[ $PREFIX = *'${('[^\)]# ]]; then "F:join arrays with newlines" "g:process echo array sequences (needs options)" "i:sort case-insensitively" - "k:subsitute keys of associative arrays" + "k:substitute keys of associative arrays" "L:lower case all letters" "n:sort decimal integers numerically" "o:sort in ascending order (lexically if no other sort option)"