mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-05-21 12:01:54 +02:00
52303: updates to completions for macOS 13
This commit is contained in:
parent
ddfc81a2b8
commit
6306dcfaa5
20 changed files with 100 additions and 73 deletions
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
|||
2023-11-17 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* 52303: Completion/Unix/Command/_ifconfig,
|
||||
Completion/Unix/Command/_chown, Completion/Unix/Command/_cp,
|
||||
Completion/Unix/Command/_cut, Completion/Unix/Command/_date,
|
||||
Completion/Unix/Command/_du, Completion/Unix/Command/_env,
|
||||
Completion/Unix/Command/_id, Completion/Unix/Command/_ln,
|
||||
Completion/Unix/Command/_ls, Completion/Unix/Command/_make,
|
||||
Completion/Unix/Command/_mount, Completion/Unix/Command/_mv,
|
||||
Completion/Unix/Command/_rm, Completion/Unix/Command/_sed,
|
||||
Completion/Unix/Command/_split, Completion/Unix/Command/_touch,
|
||||
Completion/Unix/Command/_uniq, Completion/Unix/Command/_xargs:
|
||||
updates to completions for macOS 13
|
||||
|
||||
2023-11-15 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 52309: Src/exec.c: suppress job control inside <<(substition)
|
||||
|
|
|
@ -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' )
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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" \
|
||||
|
|
|
@ -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*)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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*"'
|
||||
|
|
|
@ -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]' )
|
||||
;;
|
||||
|
|
|
@ -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' )
|
||||
;;
|
||||
|
|
|
@ -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]"
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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]'
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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]'
|
||||
)
|
||||
|
|
|
@ -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"'
|
||||
|
|
|
@ -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]"
|
||||
)
|
||||
;;
|
||||
|
|
|
@ -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*)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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]'
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue