diff options
author | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2018-10-24 17:32:17 +0900 |
---|---|---|
committer | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2018-10-24 17:32:17 +0900 |
commit | 4ad04eeb85fd3ab48de0532713e37a46e8482fc7 (patch) | |
tree | a52f542c9d1b7eaea4454becc4362c55ffa3ff8a | |
parent | 916ed7426422c2f203b7352d8c0654f0b1e60cbb (diff) | |
download | zsh-4ad04eeb85fd3ab48de0532713e37a46e8482fc7.tar.gz zsh-4ad04eeb85fd3ab48de0532713e37a46e8482fc7.tar.xz zsh-4ad04eeb85fd3ab48de0532713e37a46e8482fc7.zip |
43722: _ed, _env, _sort: support darwin
use the same completions as freebsd
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Completion/Unix/Command/_ed | 2 | ||||
-rw-r--r-- | Completion/Unix/Command/_env | 8 | ||||
-rw-r--r-- | Completion/Unix/Command/_sort | 14 |
4 files changed, 16 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog index c7cd65fd5..87d3369a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2018-10-24 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> + * 43722: Completion/Unix/Command/_ed, + Completion/Unix/Command/_env, Completion/Unix/Command/_sort: + use the same completions as freebsd for darwin. + * 43721: Completion/Unix/Command/_diff3: detect GNU variant correctly 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=GNU unix --version; then else args=(-A '-*' ${args:#*\)--*}) case $OSTYPE in - dragonfly*|freebsd*|netbsd*|solaris*) + dragonfly*|freebsd*|darwin*|netbsd*|solaris*) args+=( '-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=( - '(-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=( '(-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=}'[specify field separator instead of non-blank to blank transition]:separator' - '(-k --key)'{-k+,--key=}'[specified start and end fields for key]:key field' + \*{-k+,--key=}'[specified start and end fields for key]:key field' ) _pick_variant -r variant gnu=GNU $OSTYPE --version case $variant in - dragonfly*|netbsd*|openbsd*|freebsd*|gnu) + dragonfly*|netbsd*|openbsd*|freebsd*|darwin*|gnu) args+=( '(-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+=( "(-c --check -C)-C[check whether input is sorted silently; don't sort]" ) ;| - openbsd*|freebsd*|gnu) + openbsd*|freebsd*|darwin*|gnu) args+=( '(-z --zero-terminated)'{-z,--zero-terminated}'[end lines with 0 byte, not newline]' ) ;| - freebsd*|gnu) + freebsd*|darwin*|gnu) args+=( "(-c --check -C)--check=-[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=[get random bytes from file]:file:_files' '--batch-size=[maximum inputs to merge]:number' '--compress-program=[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=[read input files from file]:file:_files' '(-S --buffer-size)'{-S+,--buffer-size=}'[specify size for main memory buffer]:size' '(- *)--help[display help and exit]' @@ -71,7 +71,7 @@ case $variant in gnu) args+=( '--parallel=[set number of sorts run concurrently]:number' ) ;; - freebsd*) + freebsd*|darwin*) args+=( --radixsort --mergesort --qsort --heapsort --mmap ) ;; *) args=( "${(@)args:#(|\(*\))(|\*)--*}" ) ;; |