From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-return-43718-ml=inbox.vuxu.org@zsh.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 63788b05 for ; Sun, 21 Oct 2018 22:23:10 +0000 (UTC) Received: (qmail 13174 invoked by alias); 21 Oct 2018 22:22:48 -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: List-Unsubscribe: X-Seq: 43718 Received: (qmail 2323 invoked by uid 1010); 21 Oct 2018 22:22:47 -0000 X-Qmail-Scanner-Diagnostics: from mail-it1-f173.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.166.173):SA:0(-1.9/5.0):. Processed in 2.408618 secs); 21 Oct 2018 22:22:47 -0000 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=4EwISVoPHDqXncD+AwLhf0eABerteWhxlVpBC0SpIg0=; b=IQuh1E7hNdLwXfxwP4qKLHsci3k6z417u7VcKpSOq3iMVQdIJk9kT8O+Q41u/AH6il 1+n8eJ16YyeVbws7LAEnwtUbfnRteKd3CIS09BMQx3zIpwQs6Ip/AYjQrhL0ievsol5U u5bDWi6OL+E4IzkXWLzbdNkrCwBRnwx2NIfatzr/sM73xhFBE2PeTgNX7FP+EDDfoy5F T3VOHpNZTOe7gSXtLY93VdeG6V8QYnD5sym1fJkcKRdIrdUhfZpqIw0ryynTKZUmv0sW /9PZghS+vISn3YISW3qMSftPM0O+AhtME3rmklRVV58fWVs9Xdvz7I7Kr+D1RXwhzpQw m+vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=4EwISVoPHDqXncD+AwLhf0eABerteWhxlVpBC0SpIg0=; b=OkdhJqGQXHW7alHCtXT5r5UJfwChyHikwsBeyLmxCO5fg+u4GxEJhKteWmXymOvS++ ZK8VQGEN02RrW4vmeDw3O06lpuo6Cibq7IlrZowF9JP9Nw9wth/qBSYXBxeReXbIPpsD a6mivEVeJL+HAPABwxSPy9g717GF8bNK5tgcVQOOxXOaQDaavzsStO57HtlbXfclC1fa FiV2Reeiu+9Lg9vQfVg+lB19KCAcRyl5j4Kz7nISAq5g800Shc4A8X7zlqCKo6xVaoeP bb8Se0lOBZ+dFmYGN8FTQuh1cQ5irSv1smKH/CR9afOVZt1QNovSM2fl1y+BAA0OvL/4 HoYQ== X-Gm-Message-State: ABuFfohz4tQgvYwcQT93S97HDj8a5dvO7PdBAMJknC1oreWF+2w/JOOh IzXFevhafyc1RPOnAYUVHrFnhyEbXLTanw== X-Google-Smtp-Source: ACcGV60M7qJmcR1RFxFxHaYv+Fo7egid02CNjFIPJDDNtDRZFocAxMqRW3W3DXA2Rv9czKc14w9EtQ== X-Received: by 2002:a24:75d6:: with SMTP id y205-v6mr8618895itc.1.1540160562166; Sun, 21 Oct 2018 15:22:42 -0700 (PDT) From: dana Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 11.4 \(3445.8.2\)) Subject: [PATCH] Completion: Change plural descriptions to singular Message-Id: Date: Sun, 21 Oct 2018 17:22:40 -0500 To: Zsh hackers list X-Mailer: Apple Mail (2.3445.8.2) =46rom the completion style guide: >Group descriptions should be singular because only one thing is being >completed even though many may be listed. This applies even where you >complete a list of the things. Despite this, many functions use plural descriptions. The most = noticeable for me have always been the ones like ls and grep that override the default set = by _files. This patch fixes many of those; there are still a bunch left, = but i thought i'd limit myself (Also, a few of the ones i changed weren't actually being applied = because they're overridden by a ->state description or because the type function = they call ignores the description set by _arguments. But they're still either = wrong or misleading, so i changed them anyway) dana diff --git a/Completion/BSD/Command/_fstat = b/Completion/BSD/Command/_fstat index 5487e6c0f..153378441 100644 --- a/Completion/BSD/Command/_fstat +++ b/Completion/BSD/Command/_fstat @@ -9,4 +9,4 @@ _arguments -s \ '-p+[report all files open by the specified process]:process id:_pids' = \ '-u+[report all files open by the specified user]:user:_users' \ '-v[verbose mode]' \ -'*:files:_files' +'*: :_files' diff --git a/Completion/Unix/Command/_awk b/Completion/Unix/Command/_awk index 4063743e5..b23ecdf9d 100644 --- a/Completion/Unix/Command/_awk +++ b/Completion/Unix/Command/_awk @@ -21,7 +21,7 @@ args=3D( '*'{-v+,--assign}'[assign values to variables]:assignment:' '(1)*'{-f+,--file}'[read program file]:program file:->script' '1: :_guard "^-*" "program text"' - '*:input files:_files' + '*:input file:_files' ) =20 case $variant in diff --git a/Completion/Unix/Command/_cat b/Completion/Unix/Command/_cat index e383f8c6b..c78dc4cd9 100644 --- a/Completion/Unix/Command/_cat +++ b/Completion/Unix/Command/_cat @@ -16,7 +16,7 @@ if _pick_variant gnu=3DGNU unix --version; then '(-v --show-nonprinting)'{-v,--show-nonprinting}'[use ^ and M- = notation, except for LFD and TAB]' '(- : *)--help[display help and exit]' '(- : *)--version[output version information and exit]' - '*:files:_files' + '*: :_files' ) =20 elif [[ "$OSTYPE" =3D=3D (*bsd|dragonfly|darwin)* ]]; then @@ -29,7 +29,7 @@ elif [[ "$OSTYPE" =3D=3D (*bsd|dragonfly|darwin)* ]]; = then '(-v)-t[display tab as ^I (implies -v)]' '-u[do not buffer output]' '-v[display non-printing chars as ^X or M-a]' - '*:files:_files' + '*: :_files' ) [[ $OSTYPE =3D (free|net)bsd* ]] && args+=3D( '-l[set a lock on the stdout file descriptor]' @@ -48,14 +48,14 @@ elif [[ $OSTYPE =3D solaris* ]]; then '-v[display non-printing chars as ^X or M-a]' '-e[display $ at the end of each line (requires -v)]' '-t[display tab as ^I and formfeeds and ^L (requires -v)]' - '*:files:_files' + '*: :_files' ) else # POSIX reqires '-u', and most OSes may support '-n' args=3D( '-n[number all output lines]' '-u[do not buffer output]' - '*:files:_files' + '*: :_files' ) fi =20 diff --git a/Completion/Unix/Command/_chown = b/Completion/Unix/Command/_chown index 2c63a399a..a97a0e0bf 100644 --- a/Completion/Unix/Command/_chown +++ b/Completion/Unix/Command/_chown @@ -40,7 +40,7 @@ else fi =20 (( $+words[(r)--reference*] )) || args+=3D( '(--reference)1: :->owner' = ) -_arguments -C -s "$args[@]" '*:files:->files' && ret=3D0 +_arguments -C -s "$args[@]" '*: :->files' && ret=3D0 =20 case $state in owner) diff --git a/Completion/Unix/Command/_df b/Completion/Unix/Command/_df index a31145cd4..21abff105 100644 --- a/Completion/Unix/Command/_df +++ b/Completion/Unix/Command/_df @@ -19,7 +19,7 @@ if _pick_variant gnu=3DGNU unix --version; then '!-v' '(- : *)--help[display help and exit]' '(- : *)--version[output version information and exit]' - '*:files:_umountable' + '*: :_umountable' - '(format)' {-B+,--block-size=3D}'[specify block size]:size (bytes)' '-k[like --block-size=3D1K]' @@ -36,7 +36,7 @@ elif [[ "$OSTYPE" =3D=3D = (darwin|dragonfly|freebsd|netbsd*|openbsd)* ]]; then '(-G -i -P)-i[include inode usage statistics (default)]' '-l[only display locally-mounted file systems]' '-n[use previously obtained statistics]' - '*:files:_umountable' + '*: :_umountable' ) spec=3D'[only display file systems of specified types]:file system = type:->fslist' case "$OSTYPE" in @@ -93,7 +93,7 @@ else '-k[use 1024-byte blocks]' '-P[POSIX compliant output]' '-t[include total allocated-space figures in the output]' - '*:files:_umountable' + '*: :_umountable' ) fi =20 diff --git a/Completion/Unix/Command/_grep = b/Completion/Unix/Command/_grep index 3bc8d3fe0..d3e1b1a6e 100644 --- a/Completion/Unix/Command/_grep +++ b/Completion/Unix/Command/_grep @@ -10,11 +10,11 @@ if [[ $service =3D *GREP_OPT* ]]; then else arguments=3D( '(-e --regexp -f --file)1: :_guard "^-*" pattern' ) if [[ $service =3D z* ]]; then - arguments+=3D( '*:files:_files -g "*.gz(-.)"' ) + arguments+=3D( '*: :_files -g "*.gz(-.)"' ) elif [[ $service =3D bz* ]]; then - arguments+=3D( '*:files:_files -g "*.bz2(-.)"' ) + arguments+=3D( '*: :_files -g "*.bz2(-.)"' ) else - arguments+=3D( '*:files:_files' ) + arguments+=3D( '*: :_files' ) fi command=3D"$words[1]" fi diff --git a/Completion/Unix/Command/_ls b/Completion/Unix/Command/_ls index ea96de6ff..cedea1de9 100644 --- a/Completion/Unix/Command/_ls +++ b/Completion/Unix/Command/_ls @@ -37,7 +37,7 @@ if ! _pick_variant gnu=3Dgnu unix --help; then =20 '(-B -b -w -q)-q[hide control chars]' =20 - '*:files:_files' + '*: :_files' ) if [[ "$OSTYPE" =3D (netbsd*|dragonfly*|freebsd*|openbsd*|darwin*) = ]]; then arguments+=3D( diff --git a/Completion/Unix/Command/_od b/Completion/Unix/Command/_od index aba400660..046018131 100644 --- a/Completion/Unix/Command/_od +++ b/Completion/Unix/Command/_od @@ -61,7 +61,7 @@ else esac fi =20 -_arguments -C -s -S : "$args[@]" '*:files:_files' && return 0 +_arguments -C -s -S : "$args[@]" '*: :_files' && return 0 =20 case "$state" in (format) diff --git a/Completion/Unix/Command/_pax b/Completion/Unix/Command/_pax index 7ebaa6aa5..0ae58423c 100644 --- a/Completion/Unix/Command/_pax +++ b/Completion/Unix/Command/_pax @@ -44,4 +44,4 @@ _arguments -s \ '-X[do not descend into directories that have a different device ID]' = \ '-Y[ignore older files by ctime after file name mods]' \ '-Z[ignore older files after file name mods]' \ - '*:files:_files' + '*: :_files' diff --git a/Completion/Unix/Command/_rar b/Completion/Unix/Command/_rar index 906e236fd..68982be60 100644 --- a/Completion/Unix/Command/_rar +++ b/Completion/Unix/Command/_rar @@ -58,7 +58,7 @@ case $service in '-n+:file to include:_files' \ '-n@+:file of files to include:_files' \ "$common[@]" \ - '*:RAR files:_files -g \*.rar\(-.\)' + '*:RAR file:_files -g \*.rar\(-.\)' fi ;; rar) @@ -126,7 +126,7 @@ case $service in '-w+[assign work directory]:work directory:_files -/' \ "$common[@]" \ '-z+[read archive comment from file]:comment file:_files' \ - '*:files:_files' + '*: :_files' fi ;; esac diff --git a/Completion/Unix/Command/_rm b/Completion/Unix/Command/_rm index 912b5eadf..aa24a3fd6 100644 --- a/Completion/Unix/Command/_rm +++ b/Completion/Unix/Command/_rm @@ -5,7 +5,7 @@ args=3D( '(-f --force)'{-f,--force}'[ignore nonexistent files, never prompt]' '(-I --interactive)-i[prompt before every removal]' '(-r -R --recursive)'{-r,-R,--recursive}'[remove directories and = their contents recursively]' - '*::files:->file' + '*:: :->file' ) if _pick_variant gnu=3Dgnu unix --help; then opts+=3D(-S) diff --git a/Completion/Unix/Command/_xxd b/Completion/Unix/Command/_xxd index 0034be519..3a8efd664 100644 --- a/Completion/Unix/Command/_xxd +++ b/Completion/Unix/Command/_xxd @@ -41,7 +41,7 @@ arguments=3D( {-o+,-offset}'[add specified offset to displayed file = position]:offset' {-s,-skip,-seek}'[specify file offset to dump from]: :_guard "[0-9]#" = "file offset to dump from (absolute or relative)"' =20 - ':files:_files' + ': :_files' ) =20 _arguments -S $arguments