From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-return-43722-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=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 9b75eae6 for ; Tue, 23 Oct 2018 10:51:52 +0000 (UTC) Received: (qmail 27541 invoked by alias); 23 Oct 2018 10:51:41 -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: 43722 Received: (qmail 26749 invoked by uid 1010); 23 Oct 2018 10:51:41 -0000 X-Qmail-Scanner-Diagnostics: from rcpt-expgw.biglobe.ne.jp 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(133.208.98.3):SA:0(-2.6/5.0):. Processed in 1.20689 secs); 23 Oct 2018 10:51:41 -0000 X-Envelope-From: takimoto-j@kba.biglobe.ne.jp X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Biglobe-Sender: From: Jun T Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) Subject: [PATCH] _ed, _env, _sort: support Darwin (= FreeBSD) Message-Id: Date: Tue, 23 Oct 2018 19:51:37 +0900 To: zsh-workers@zsh.org X-Mailer: Apple Mail (2.3445.100.39) X-Biglobe-Spnum: 64116 macOS borrows ed, env and sort from FreeBSD, and the same completions as FreeBSD can be used. _env and _sort also include a few minor fixes. diff --git a/Completion/Unix/Command/_ed b/Completion/Unix/Command/_ed index 50d2710fc..6ca9ceace 100644 --- a/Completion/Unix/Command/_ed +++ b/Completion/Unix/Command/_ed @@ -19,7 +19,7 @@ if _pick_variant gnu=3DGNU unix --version; then else args=3D(-A '-*' ${args:#*\)--*}) case $OSTYPE in - dragonfly*|freebsd*|netbsd*|solaris*) + dragonfly*|freebsd*|darwin*|netbsd*|solaris*) args+=3D( '-x[prompt for an encryption key]' ) diff --git a/Completion/Unix/Command/_env b/Completion/Unix/Command/_env index 99fc513d7..932a7fc89 100644 --- a/Completion/Unix/Command/_env +++ b/Completion/Unix/Command/_env @@ -16,11 +16,11 @@ case $variant in "${ign}(- *)--version[display version information]" ) ;; - freebsd*) + freebsd*|darwin*) args=3D( - '(-i)*-u[remove variable from the environment]:env var to = remove:_parameters -g "*export*"' - '-P[specify alternate executable search PATH]:path:_dir_list' - '-S[perform word splitting]' + '(-i)*-u+[remove variable from the environment]:env var to = remove:_parameters -g "*export*"' + '-P+[specify alternate executable search PATH]:path:_dir_list' + '-S+[perform word splitting]:string to split' '*-v[verbose output]' ) ;& diff --git a/Completion/Unix/Command/_sort = b/Completion/Unix/Command/_sort index dfd43ce55..a463cf4c0 100644 --- a/Completion/Unix/Command/_sort +++ b/Completion/Unix/Command/_sort @@ -16,27 +16,27 @@ args=3D( '(-r --reverse)'{-r,--reverse}'[reverse the result of comparisons]' '(-b --ignore-leading-blanks)'{-b,--ignore-leading-blanks}'[ignore = leading blanks]' '(-t --field-separator)'{-t+,--field-separator=3D}'[specify field = separator instead of non-blank to blank transition]:separator' - '(-k --key)'{-k+,--key=3D}'[specified start and end fields for = key]:key field' + \*{-k+,--key=3D}'[specified start and end fields for key]:key field' ) =20 _pick_variant -r variant gnu=3DGNU $OSTYPE --version case $variant in - dragonfly*|netbsd*|openbsd*|freebsd*|gnu) + dragonfly*|netbsd*|openbsd*|freebsd*|darwin*|gnu) args+=3D( '(-s --stable)'{-s,--stable}'[preserve original order of lines = with the same key]' ) ;| - netbsd*|openbsd*|freebsd*|gnu|solaris2.<11->) + netbsd*|openbsd*|freebsd*|darwin*|gnu|solaris2.<11->) args+=3D( "(-c --check -C)-C[check whether input is sorted silently; don't = sort]" ) ;| - openbsd*|freebsd*|gnu) + openbsd*|freebsd*|darwin*|gnu) args+=3D( '(-z --zero-terminated)'{-z,--zero-terminated}'[end lines with 0 = byte, not newline]' ) ;| - freebsd*|gnu) + freebsd*|darwin*|gnu) args+=3D( "(-c --check -C)--check=3D-[check whether input is sorted; don't = sort]::bad line handling:(diagnose-first silent quiet)" "$ordering"{-g,--general-numeric-sort}'[compare according to = general numeric value]' @@ -49,7 +49,7 @@ case $variant in '--random-source=3D[get random bytes from file]:file:_files' '--batch-size=3D[maximum inputs to merge]:number' '--compress-program=3D[specify program to compress temporary = files with]:program:(gzip bzip2 lzop xz)' - '--debug[annotate the of the line used to sort]' + '--debug[annotate the part of the line used to sort]' '(*)--files0-from=3D[read input files from file]:file:_files' '(-S --buffer-size)'{-S+,--buffer-size=3D}'[specify size for main = memory buffer]:size' '(- *)--help[display help and exit]' @@ -71,7 +71,7 @@ case $variant in gnu) args+=3D( '--parallel=3D[set number of sorts run = concurrently]:number' ) ;; - freebsd*) + freebsd*|darwin*) args+=3D( --radixsort --mergesort --qsort --heapsort --mmap ) ;; *) args=3D( "${(@)args:#(|\(*\))(|\*)--*}" ) ;;