Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: updates to completions for macOS
- X-seq: zsh-workers 52303
- From: Oliver Kiddle <opk@xxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: updates to completions for macOS
- Date: Wed, 15 Nov 2023 01:12:55 +0100
- Archived-at: <https://zsh.org/workers/52303>
- List-id: <zsh-workers.zsh.org>
This updates completion for various core Unix tools, primarily for macOS
13 but also one or two additions for other systems found when comparing
documentation. It appears they've finally been pulling in some changes
from other BSDs. I don't normally use a Mac but briefly got access so
testing has been limited.
GNU make seems to be installed under the name gnumake rather than gmake
so I've added that for the _make #compdef line.
Oliver
diff --git a/Completion/Unix/Command/_chown b/Completion/Unix/Command/_chown
index 9ebbf7bab..4362d6e75 100644
--- a/Completion/Unix/Command/_chown
+++ b/Completion/Unix/Command/_chown
@@ -43,7 +43,7 @@ case "$variant" in
'(-H -L -P)-P[do not follow symlinks (default)]'
)
;|
- dragonfly*|freebsd*)
+ dragonfly*|freebsd*|darwin*)
args+=(
"-x[don't traverse file systems]"
)
@@ -63,6 +63,11 @@ case "$variant" in
'-s[owner and/or group are Windows SID strings]'
)
;;
+ darwin*)
+ args+=(
+ '-n[interpret user and group as numeric, avoiding name lookups]'
+ )
+ ;;
esac
(( $+words[(r)--reference*] )) || args+=( '(--reference)1: :->owner' )
diff --git a/Completion/Unix/Command/_cp b/Completion/Unix/Command/_cp
index f7411055b..da9428ce3 100644
--- a/Completion/Unix/Command/_cp
+++ b/Completion/Unix/Command/_cp
@@ -51,14 +51,16 @@ else
'(aix|hpux|irix|solaris)*' '-r[copy directories recursively]' \
'solaris2.<9->*' '-@[preserve extended attributes]' \
'solaris2.<11->*' '-/[preserve extended attributes and extended system attributes]' \
+ 'solaris2.<11->*' '-z[fast relink(3C) based copy]' \
'(darwin|dragonfly|freebsd)*' "(-f -i)-n[don't overwrite existing file]" \
'netbsd*' "-N[don't copy file flags]" \
'(darwin|dragonfly|freebsd|netbsd|openbsd)*' '-a[archive mode, same as -RpP]' \
- '(dragonfly|freebsd)*' '-l[link files instead of copying]' \
+ '(dragonfly|freebsd|darwin)*' '-l[link files instead of copying]' \
'(darwin|dragonfly|*bsd)*' '-v[show file names as they are copied]' \
'darwin*' "-X[don't copy extended attributes or resource forks]" \
- '(dragonfly|freebsd)*' "-x[don't traverse file systems]" \
- 'freebsd<10->.*' '-s[make symbolic links instead of copies of non-directories]'
+ '(dragonfly|freebsd|darwin)*' "-x[don't traverse file systems]" \
+ '(freebsd<10->.|darwin)*' '-s[make symbolic links instead of copies of non-directories]' \
+ 'darwin*' '-c[copy files using clonefile(2)]'
do
[[ $OSTYPE = $~pattern ]] && args+=( $arg )
done
diff --git a/Completion/Unix/Command/_cut b/Completion/Unix/Command/_cut
index 29565280d..778439cf1 100644
--- a/Completion/Unix/Command/_cut
+++ b/Completion/Unix/Command/_cut
@@ -46,7 +46,7 @@ if _pick_variant gnu="Free Soft" unix --version; then
'*:file:_files'
else
case $OSTYPE in
- freebsd*|dragonfly*) args=( '(-d)-w[use whitespace as the delimiter]' ) ;;
+ freebsd*|dragonfly*|darwin*) args=( '(-d)-w[use whitespace as the delimiter]' ) ;;
esac
_arguments $args \
"-b[${_cut_args[bytes]}]:list" \
diff --git a/Completion/Unix/Command/_date b/Completion/Unix/Command/_date
index a15d30b21..f0053ec02 100644
--- a/Completion/Unix/Command/_date
+++ b/Completion/Unix/Command/_date
@@ -7,8 +7,8 @@ local -a opts args
opts=( -s -w -C )
if _pick_variant gnu="Free Software Foundation" unix --version; then
- local d='(-d --date -f --file -r --reference -s --set)'
- local f='(-I --iso-8601 -R --rfc-email --rfc-3339)'
+ local d='(-d --date -f --file -r --reference -s --set --resolution)'
+ local f='(-I --iso-8601 -R --rfc-email --rfc-3339 --resolution)'
args=(
$d{-d+,--date=}'[output date specified by string]:time string'
'--debug[annotate parsed date and warn about questionable usage]'
@@ -16,10 +16,10 @@ if _pick_variant gnu="Free Software Foundation" unix --version; then
$d{-r+,--reference=}'[output last modification time of specified file]:file:_files'
$d{-s+,--set=}'[set time]:time string'
$f{-I-,--iso-8601=-}'[display in ISO 8601 format]::precision:(date hours minutes seconds ns)'
+ '(-)--resolution[output the available resolution of timestamps]'
$f{-R,--rfc-email}'[display in RFC5322 format]'
$f'--rfc-3339=-[display in RFC 3339 format]:precision:(date seconds ns)'
- '(-u --utc --universal)'{-u,--utc,--universal}'[display or set time in UTC]'
- $d'--resolution[output the available resolution of timestamps]'
+ '(-u --utc --universal --resolution)'{-u,--utc,--universal}'[display or set time in UTC]'
'(- :)--help[output help and exit]'
'(- :)--version[output version info and exit]'
)
@@ -44,12 +44,12 @@ else
'-f+[use specified format for input]:parsing format:_date_formats:new date'
)
;|
- dragonfly*|darwin*|netbsd*|openbsd*)
+ dragonfly*|netbsd*|openbsd*)
args+=(
'-r+[output date specified by reference time]:seconds since epoch'
)
;|
- freebsd*)
+ freebsd*|darwin*)
local -a alts
alts=(
'seconds:sec:_guard "(0x[0-9a-fA-F]#|[0-9]#)" "seconds since epoch"'
@@ -57,23 +57,21 @@ else
)
args+=(
'-r+[reference time: file modification or literal time]:reference: _alternative $alts'
- '(-R)-I-[display in ISO 8601 format]::precision:(date hours minutes seconds)'
)
;|
freebsd*|dragonfly*|darwin*)
args+=(
+ '-R[display in RFC2822 format]'
+ '(-R)-I-[display in ISO 8601 format]::precision [date]:(date hours minutes seconds)'
"*-v+[adjust and print (but don't set) date]:[+-]value[ymwdHMS]"
)
;|
- freebsd<-12>.*|darwin*)
+ freebsd<-12>.*)
args+=(
'-d+:daylight saving time value'
'-t+:minutes west of GMT'
)
;|
- freebsd*|dragonfly*)
- args+=( '-R[display in RFC2822 format]' )
- ;|
openbsd*|netbsd*) args+=( '-a[gradually skew]' )
;|
freebsd<14->.*|openbsd*)
diff --git a/Completion/Unix/Command/_du b/Completion/Unix/Command/_du
index 711f43471..ccb5bdd94 100644
--- a/Completion/Unix/Command/_du
+++ b/Completion/Unix/Command/_du
@@ -55,7 +55,7 @@ else
)
local xdev='[skip directories on different filesystems]'
for pattern arg in \
- 'freebsd*' '-A[apparent size instead of usage]' \
+ '(freebsd|darwin)*' '-A[apparent size instead of usage]' \
'(darwin*|*bsd*|dragonfly*|solaris2.<10->)' '(-H -L -P)-H[follow symlinks on the command line]' \
'(darwin|*bsd|dragonfly)*' '(-H -L -P)-P[do not follow symlinks (default)]' \
'(darwin|dragonfly|freebsd)*' '*-I+[ignore files/directories matching specified mask]:mask' \
@@ -64,12 +64,12 @@ else
'netbsd*' '-i[output inode usage instead of blocks]' \
'(darwin*|freebsd*|netbsd*|solaris2.<11->)' '(-h -k -g -B)-m[use block size of 1M-byte]' \
'(darwin|freebsd<8->.|netbsd)*' '(-h -k -m -B)-g[use block size of 1G-byte]' \
- 'freebsd*' '(-h -k -m -g)-B+[block size]:block size (bytes)' \
+ '(freebsd|darwin)*' '(-h -k -m -g)-B+[block size]:block size (bytes)' \
'(darwin|*bsd|dragonfly)*' '-c[display grand total]' \
- 'freebsd*' '-l[count sizes many times if hard linked]' \
+ '(freebsd|darwin)*' '-l[count sizes many times if hard linked]' \
'(freebsd|netbsd)*' '-n[ignore files and directories with nodump flag set]' \
'solaris*' "(-a)-o[don't add child directories' usage to parent's total]" \
- 'freebsd<8->.*' '-t+[report only entries for which size exceeds threshold]:threshold' \
+ '(freebsd|darwin)*' '-t+[report only entries for which size exceeds threshold]:threshold' \
'solaris*' "-d$xdev" \
'(darwin|*bsd|dragonfly|solaris)*' "-x$xdev"
do
diff --git a/Completion/Unix/Command/_env b/Completion/Unix/Command/_env
index bdab71bbe..8cf0ad467 100644
--- a/Completion/Unix/Command/_env
+++ b/Completion/Unix/Command/_env
@@ -24,11 +24,13 @@ case $variant in
;;
freebsd*)
args=(
- '-0[use NUL, not newline after each variable in output]'
'-L[add variables from system login.conf(5)]: :->user-class'
'-U[add variables from user and system login.conf(5)]: :->user-class'
)
;|
+ freebsd*|darwin*)
+ args=( '-0[use NUL, not newline after each variable in output]' )
+ ;|
freebsd*|darwin*|dragonfly*)
args+=(
'(-i)*-u+[remove variable from the environment]:env var to remove:_parameters -g "*export*"'
diff --git a/Completion/Unix/Command/_id b/Completion/Unix/Command/_id
index a0a03faad..c123afcd7 100644
--- a/Completion/Unix/Command/_id
+++ b/Completion/Unix/Command/_id
@@ -41,13 +41,13 @@ else
darwin*|dragonfly*|freebsd*)
args+=( '(-)-P[print id in the form of a password file entry]' )
;|
- darwin*|freebsd*)
+ freebsd*)
args+=(
'(-)-A[print process audit user ID]'
'(-)-M[print MAC label of the current process]'
+ '(-)-c[print current login class]'
)
;|
- freebsd*) args+=( '(-)-c[print current login class]' ) ;|
darwin*|dragonfly*|freebsd*|netbsd*|openbsd*)
args+=( '(-)-p[human readable output]' )
;;
diff --git a/Completion/Unix/Command/_ifconfig b/Completion/Unix/Command/_ifconfig
index 4e1f25e2e..86ec46038 100644
--- a/Completion/Unix/Command/_ifconfig
+++ b/Completion/Unix/Command/_ifconfig
@@ -13,15 +13,16 @@ updownlist=(
case $OSTYPE in
darwin*)
- args=( -s $updownlist )
+ args=( -s $updownlist
+ '-X+[list interfaces whose names match regular expression]:regex:_net_interfaces'
+ )
opts=(
$alias $debug delete dest_address ipdst nsellength
{,-}trailers {,-}link{0,1,2}
)
- ;;
+ ;|
freebsd*|dragonfly*)
args=( -s $updownlist
- '(-a -j -f -l -G -g -u -d -m -L 1 *)-C[list interface cloners]'
'(-C)-f+[control the output format]: :_values -s, -S\: format
"addr[adjust inet address display]\:format [numeric]\:(default fqdn host numeric)"
"ether[adjust ethernet address display]\:format [colon]\:(colon dash dotted default)"
@@ -30,10 +31,7 @@ case $OSTYPE in
'(-C)-G+[exclude members of the specified group]:group'
'(-C)-g+[limit output to members of the specified group]:group'
'(-C)-k[print keying information for the interface]'
- '(-l -C)-m[list supported media]'
'(-C)-n[disable automatic loading of network interface drivers]'
- '(-l -C)-L[show address lifetime as time offset]'
- '(-C)-v[get more verbose status for an interface]'
)
listopts=(
active caps chan countries mac mesh regdomain roam txparam txpower
@@ -47,6 +45,14 @@ case $OSTYPE in
roam roam:rssi roam:rate roaming
)
;|
+ freebsd*|darwin*|dragonfly*)
+ args+=(
+ '(-a -j -f -l -G -g -u -d -m -L 1 *)-C[list interface cloners]'
+ '(-l -C)-m[list supported media]'
+ '(-l -C)-L[show address lifetime as time offset]'
+ '(-C)-v[get more verbose status for an interface]'
+ )
+ ;|
freebsd<14->.*)
args+=( '(-C)-j+[perform actions inside jail]:jail:_jails' )
;;
diff --git a/Completion/Unix/Command/_ln b/Completion/Unix/Command/_ln
index 9d5efcabb..7bd2f7f27 100644
--- a/Completion/Unix/Command/_ln
+++ b/Completion/Unix/Command/_ln
@@ -45,9 +45,11 @@ case $variant; in
{-h,-n}'[do not dereference destination]'
'(-f)-i[prompt before removing destination files]')
;;
- darwin*|dragonfly*|freebsd*|netbsd*|openbsd*)
+ darwin*|dragonfly*|*bsd*)
args+=(
- {-h,-n}'[do not dereference destination]'
+ {-h,-n}"[don't dereference destination]"
+ '(-L)-P[create hard links directly to symbolic links]'
+ '(-P)-L[create hard links to symbolic link references]'
)
;|
darwin*|dragonfly*|freebsd*|netbsd*)
@@ -57,12 +59,6 @@ case $variant; in
'-v[print name of each linked file]'
)
;|
- dragonfly*|freebsd*|netbsd*|openbsd*)
- args+=(
- '(-L)-P[create hard links directly to symbolic links]'
- '(-P)-L[create hard links to symbolic link references]'
- )
- ;|
dragonfly*|freebsd*|netbsd*)
args+=(
"-w[warn if source of a symbolic link doesn't currently exist]"
diff --git a/Completion/Unix/Command/_ls b/Completion/Unix/Command/_ls
index 975a28196..392b8490b 100644
--- a/Completion/Unix/Command/_ls
+++ b/Completion/Unix/Command/_ls
@@ -75,12 +75,12 @@ if ! _pick_variant gnu=gnu unix --help; then
if [[ $OSTYPE = (dragonfly*|freebsd*|darwin*) ]]; then
arguments+=(
'-G[enable colorized output]'
+ '(-A)-I[prevent -A from being automatically set for the super-user]'
'-P[do not follow symlinks]'
)
fi
if [[ $OSTYPE = (dragonfly*|freebsd*) ]]; then
arguments+=(
- '(-A)-I[prevent -A from being automatically set for the super-user]'
'(-1 -C -m -x)-D+[specify format for date]:format: _date_formats'
)
fi
@@ -91,15 +91,17 @@ if ! _pick_variant gnu=gnu unix --help; then
)
fi
if [[ $OSTYPE = (freebsd*|darwin*) ]]; then
- arguments+=( '(-c -u)-U[file creation time]' )
+ arguments+=(
+ '-,[print file sizes grouped and separated by thousands]'
+ '(-c -u)-U[file creation time]'
+ '-y[with -t, sort filenames in the same order as the time]'
+ '--color=-[control use of color]:color:(never always auto)'
+ )
fi
if [[ $OSTYPE = freebsd* ]]; then
arguments+=(
- '-,[print file sizes grouped and separated by thousands]'
'(-S -f -t -U)-v[sort by version (filename treated numerically)]'
- '-y[with -t, sort filenames in the same order as the time]'
'-Z[display MAC label]'
- '--color=-[control use of color]:color:(never always auto)'
)
fi
if [[ $OSTYPE = darwin* ]]; then
@@ -109,6 +111,7 @@ if ! _pick_variant gnu=gnu unix --help; then
'(-l -1 -C -m -x)-o[long listing but without group information]'
'-O[display file flags]'
'-v[print raw characters]'
+ '-%[distinguish dataless files and directories with a %]'
)
fi
if [[ $OSTYPE = solaris* ]]; then
@@ -140,8 +143,8 @@ else
'(--recursive -R)'{--recursive,-R}'[list subdirectories recursively]'
'(--no-group -G)'{--no-group,-G}'[inhibit display of group information]'
- '(--block-size --human-readable -h --si --kilobytes -k)'{--human-readable,-h}'[print sizes in human readable form]'
- '(--block-size --human-readable -h --si --kilobytes -k)--si[sizes in human readable form; powers of 1000]'
+ '(--block-size --human-readable -h --si --kibibytes -k)'{--human-readable,-h}'[print sizes in human readable form]'
+ '(--block-size --human-readable -h --si --kibibytes -k)--si[sizes in human readable form; powers of 1000]'
'(--inode -i)'{--inode,-i}'[print file inode numbers]'
'(--format -l -g -o -1 -C -m -x)-l[long listing]'
@@ -149,16 +152,16 @@ else
--group-directories-first
'(--format -l --no-group -G -1 -C -m -x)-o[no group, long]'
'(--format -l -g -o -C -m -x)-1[single column output]'
- '(--format -l -g -o -1 -m -x)-C[list entries in columns sorted vertically]'
- '(--format -l -g -o -1 -C -x)-m[comma separated]'
- '(--format -l -g -o -1 -C -m)-x[sort horizontally]'
+ '(--format -l -g -o -1 -m -x --block-size --human-readable -h --si --kibibytes -k)-C[list entries in columns sorted vertically]'
+ '(--format -l -g -o -1 -C -x --block-size --human-readable -h --si --kibibytes -k)-m[comma separated]'
+ '(--format -l -g -o -1 -C -m --block-size --human-readable -h --si --kibibytes -k)-x[sort horizontally]'
'(-l -g -o -1 -C -m -x)--format=[specify output format]:format:(verbose long commas horizontal across vertical single-column)'
'(--size -s -f)'{--size,-s}'[display size of each file in blocks]'
'(--time -u)-c[status change time]'
'(--time -c)-u[access time]'
- '(-c -u)--time=[specify time to show]:time:(ctime status use atime access)'
+ '(-c -u)--time=[specify time to show]:time:(ctime status use atime access birth creation)'
'--time-style=[show times using specified style]:style: _alternative "time-styles\:time style\:(full-iso long-iso iso locale)" $datef'
'(-a --all -U -l --format -s --size -t --sort --full-time)-f[unsorted, all, short list]'
@@ -174,15 +177,16 @@ else
'--color=-[control use of color]:color:(never always auto)'
"*--hide=[like -I, but overridden by -a or -A]:pattern: "
'--hyperlink=[output terminal codes to link files using file::// URI]::when:(none auto always)'
- '(--classify -F --indicator-style -p --file-type)'{--classify,-F}'[append file type indicators]'
+ '(--classify -F --indicator-style -p --file-type)-F[append file type indicators]'
+ '(--classify -F --indicator-style -p --file-type)--classify=-[append file type indicators]::when [always]:(none auto always)'
'(--file-type -p --indicator-style -F --classify)--file-type[append file type indicators except *]'
'(--file-type -p --indicator-style -F --classify)-p[append / to directories]'
'(-F --classify -p --file-type)--indicator-style=[specify indicator style]:indicator style:(none file-type classify slash)'
'(-f)--full-time[list both full date and full time]'
- '(--block-size --human-readable -h --si --kilobytes -k)'{--kilobytes,-k}'[use block size of 1k]'
- '(--human-readable -h --si --kilobytes -k)--block-size=[specify block size]:block size (bytes):(K M G T P E Z Y KB MB TB PB EB ZB YB)'
+ '(--block-size --human-readable -h --si --kibibytes -k)'{--kibibytes,-k}'[use block size of 1k]'
+ '(--human-readable -h --si --kibibytes -k -C -x)--block-size=[specify block size]:block size (bytes):(K M G T P E Z Y KB MB TB PB EB ZB YB)'
'(--numeric-uid-gid -n)'{--numeric-uid-gid,-n}'[numeric uid, gid]'
'(--tabsize -T)'{--tabsize=,-T+}'[specify tab size]:tab size'
@@ -195,6 +199,7 @@ else
'(--hide-control-chars -q --show-control-chars)'{--hide-control-chars,-q}'[hide control chars]'
'(-q --hide-control-chars)--show-control-chars'
+ '--zero[end each output line with NUL, not newline]'
'(- :)--help[display help information]'
'(- :)--version[display version information]'
'*:file:_files'
diff --git a/Completion/Unix/Command/_make b/Completion/Unix/Command/_make
index d5ec6423d..99c786dc7 100644
--- a/Completion/Unix/Command/_make
+++ b/Completion/Unix/Command/_make
@@ -1,4 +1,4 @@
-#compdef make gmake pmake dmake freebsd-make bmake
+#compdef make gmake gnumake pmake dmake freebsd-make bmake
# TODO: Based on targets given on the command line, show only variables that
# are used in those targets and their dependencies.
diff --git a/Completion/Unix/Command/_mount b/Completion/Unix/Command/_mount
index 301b9e58e..5a379b424 100644
--- a/Completion/Unix/Command/_mount
+++ b/Completion/Unix/Command/_mount
@@ -40,12 +40,13 @@ fi
# are below these table.
local curcontext="$curcontext" state line expl suf ret=1
-local args deffs=iso9660 tmp typeops=-t _nfs_access _fs_nfs _nfs_ufs \
+local deffs=iso9660 tmp typeops=-t _nfs_access _fs_nfs _nfs_ufs \
_fs_ufs _fs_efs _fs_cd9660 _fs_iso9660 _fs_cachefs _fs_s5fs _fs_tmpfs _fs_pcfs \
_fs_hsfs _fs_advfs _fs_cdfs _fs_affs _fs_ext2 _fs_fat _fs_ext3 _fs_msdos \
_fs_msdosfs _fs_umsdos _fs_vfat _fs_hpfs _fs_ntfs _fs_reiserfs _fs_smbfs \
_fs_xfs _fs_std _fs_devfs _fs_fdesc _fs_kernfs _fs_linprocfs _fs_linsysfs \
_fs_procfs _fs_btrfs _fs_ext4
+local -a args
typeset -A opt_args
@@ -735,8 +736,11 @@ if [[ "$service" = mount ]]; then
deffs=hsfs
typeops=-F
;;
+ darwin*)
+ args=( '-k[follow no symlinks in the provided mount-on directory]' )
+ ;&
freebsd*|dragonfly*|darwin*)
- args=( -s
+ args=( -s $args
'(:)-a[mount all filesystems in fstab]'
'-d[cause everything to be done except for the actual system call]'
'-f[forced mount]'
diff --git a/Completion/Unix/Command/_mv b/Completion/Unix/Command/_mv
index 84e43d47e..c52e7a5e4 100644
--- a/Completion/Unix/Command/_mv
+++ b/Completion/Unix/Command/_mv
@@ -13,13 +13,17 @@ case $variant; in
{existing,nil}"[numbered backups, if they already exist]"
{simple,never}"[always make simple backups]"'
'(-b --backup -n --no-clobber)-b[make a backup of each existing destination file]'
+ '(-v)--debug[explain how a file is copied]'
'(-f --force -i --interactive -n --no-clobber)'{-f,--force}"[don't prompt before overwriting]"
'(-f --force -i --interactive -n --no-clobber)'{-i,--interactive}'[prompt before overwriting existing file]'
+ '(-f --force -i --interactive -n --no-clobber)'{-n,--no-clobber}"[don't overwrite existing file]"
+ "--no-copy[don't copy if renaming fails]"
'--strip-trailing-slashes[remove any trailing slashes from each source argument]'
'(-S --suffix)'{-S+,--suffix=}'[specify the backup suffix]:backup suffix [~]'
'(-t --target-directory)'{-t+,--target-directory=}'[move all source arguments into specified directory]:directory:_directories'
'(-T --no-target-directory)'{-T,--no-target-directory}'[treat final argument as a normal file]'
- '(-u --update)'{-u,--update}'[move only when destination file is older or missing]'
+ '(-u)--update=-[move only when destination file is older or missing]::update files [older]:(all none older)'
+ '(--update)-u[move only when destination file is older or missing]'
'(-v --verbose)'{-v,--verbose}'[show file names after they are moved]'
'(- *)--help[display usage information]'
'(- *)--version[display version information]'
@@ -37,6 +41,7 @@ case $variant; in
darwin*|dragonfly*|freebsd*)
args+=(
"(-f -i)-n[don't overwrite existing file]"
+ "-h[if target is a symlink to a directory, don't follow it]"
)
;|
darwin*|dragonfly*|*bsd*)
@@ -44,11 +49,6 @@ case $variant; in
'-v[show file names after they are moved]'
)
;|
- dragonfly*|freebsd*)
- args+=(
- "-h[if target is a symlink to a directory, don't follow it]"
- )
- ;;
esac
_arguments -s -S $aopts $args \
diff --git a/Completion/Unix/Command/_rm b/Completion/Unix/Command/_rm
index e66b77fa4..6dddb5ece 100644
--- a/Completion/Unix/Command/_rm
+++ b/Completion/Unix/Command/_rm
@@ -47,14 +47,10 @@ case $variant; in
darwin*|dragonfly*|freebsd*|netbsd*)
args+=(
'-W[attempt to undelete named files]'
- )
- ;|
- dragonfly*|freebsd*|netbsd*)
- args+=(
"-x[don't cross file systems when removing a hierarchy]"
)
;|
- dragonfly*|freebsd*)
+ darwin*|dragonfly*|freebsd*)
args+=(
'(-i)-I[prompt when removing many files]'
)
diff --git a/Completion/Unix/Command/_sed b/Completion/Unix/Command/_sed
index 79a010c92..ef3aaf2fd 100644
--- a/Completion/Unix/Command/_sed
+++ b/Completion/Unix/Command/_sed
@@ -104,14 +104,13 @@ else
case $OSTYPE in
openbsd*|freebsd*|netbsd*|darwin*|dragonfly*)
args+=(
- '(-r -E)'-E$extended
+ '(-r -E)'{-E,-r}$extended
'-a[delay opening files listed with w function]'
)
;|
- openbsd*|freebsd*|netbsd*|dragonfly*) args+=( '(-r -E)'-r$extended ) ;|
darwin*|freebsd*|netbsd*|openbsd*|dragonfly*) args+=( '-i+'$inplace ) ;|
darwin*|freebsd*|netbsd*|dragonfly*) args+=( '-l[make output line buffered]' ) ;|
- freebsd*|dragonfly*) args+=( '-u[disable data buffering]' ) ;|
+ darwin*|freebsd*|dragonfly*) args+=( '-u[disable data buffering]' ) ;|
freebsd*|netbsd*|dragonfly*)
args+=(
'-I+[edit files in-place, treating all files as a single input stream]:: :_guard "^(*[@/; \\\]*|?(#c6,)|-*)" "suffix for backup"'
diff --git a/Completion/Unix/Command/_split b/Completion/Unix/Command/_split
index 5ecc1bb67..5d5afa436 100644
--- a/Completion/Unix/Command/_split
+++ b/Completion/Unix/Command/_split
@@ -39,17 +39,17 @@ case $variant in
'(- 1 2)--version[display version information]'
)
;;
- (free|net)bsd*)
+ (free|net)bsd*|darwin*)
args+=( '(-b -l -p)-n+[generate specified number of output files]:output files' )
;|
darwin*|freebsd*)
args+=(
+ '-d[use numeric suffixes]'
'(-b -l -n)-p+[split the file whenever a line matches specified pattern]:pattern'
)
;|
freebsd*)
args+=(
- '-d[use numeric suffixes]'
"-c[continue creating files and don't overwrite existing output files]"
)
;;
diff --git a/Completion/Unix/Command/_touch b/Completion/Unix/Command/_touch
index 9b9144756..47190c579 100644
--- a/Completion/Unix/Command/_touch
+++ b/Completion/Unix/Command/_touch
@@ -28,7 +28,7 @@ case $variant in
darwin*|dragonfly*|freebsd*|netbsd*)
args+=( '-h[act on symbolic links themselves]' )
;|
- dragonfly*|freebsd*|openbsd*|solaris*)
+ darwin*|dragonfly*|freebsd*|openbsd*|solaris*)
args+=( '(-r -t 1)-d+[use specified date/time]:date/time' )
;|
darwin*|dragonfly*|freebsd*|netbsd*|solaris*)
diff --git a/Completion/Unix/Command/_uniq b/Completion/Unix/Command/_uniq
index e123a94cd..479b3848d 100644
--- a/Completion/Unix/Command/_uniq
+++ b/Completion/Unix/Command/_uniq
@@ -25,7 +25,7 @@ if ! _pick_variant gnu=Free\ Soft unix --version; then
if [[ "$OSTYPE" == (darwin|dragonfly|freebsd|openbsd)* ]]; then
optchars+=i
fi
- [[ $OSTYPE = freebsd* ]] && optchars+=D
+ [[ $OSTYPE = (darwin|freebsd)* ]] && optchars+=D
args=( ${(M)args:#(|\*)(|\(*\))-[$optchars]*} )
fi
diff --git a/Completion/Unix/Command/_xargs b/Completion/Unix/Command/_xargs
index 8e23a04bb..30e5f8daa 100644
--- a/Completion/Unix/Command/_xargs
+++ b/Completion/Unix/Command/_xargs
@@ -25,7 +25,7 @@ case $variant in
'-R[specify maximum arguments that -I will replace in]:replacements'
)
;|
- freebsd*|netbsd*|dragonfly*)
+ darwin*|freebsd*|netbsd*|dragonfly*)
args+=(
'-S[space that -I can use for replacements]:size (bytes) [255]'
)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author