From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,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 24eeb1ab for ; Wed, 8 May 2019 22:02:45 +0000 (UTC) Received: (qmail 21641 invoked by alias); 8 May 2019 22:02:24 -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: 44279 Received: (qmail 15370 invoked by uid 1010); 8 May 2019 22:02:23 -0000 X-Qmail-Scanner-Diagnostics: from park01.gkg.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25440. spamassassin: 3.4.2. Clear:RC:0(205.235.26.22):SA:0(-1.6/5.0):. Processed in 5.105996 secs); 08 May 2019 22:02:23 -0000 X-Envelope-From: SRS0=ynJz=TI=yahoo.co.uk=okiddle@bounces.park01.gkg.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at bounces.park01.gkg.net designates 205.235.26.22 as permitted sender) X-Virus-Scanned: by amavisd-new at gkg.net Authentication-Results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1557352891; bh=+68zITeTD97kmrmoCL9nGNv7X7sKarxHKnSY7kLbCb4=; h=From:To:Subject:Date:From:Subject; b=l3uBG0/R/N/ktMPwRxKXwbLRjO+o2xqHv1rFnWbchLENkyawkIrGGF2cuQxcTHQtXUUQYdZppTqH9KUe3uLU4obnppdcka55l+2z49TQ9xQ/EmkbvvF/+PAjB9mbyc0U+axCWeS+BNQNt1SVuEyStfnBwDM7A/TluJxzJxSkqs34hjM8OQdAtsHhvwq77PVssNp0Ky4CYEO0dVBoxhLmSMGt1DWErmgfF4m/gFw7fuJJSHqW6EMB8PcaeJHluKHQ+bZvW0zM9vkwbN1xJfYr3+A20wN+BakUhVgNLCUxDMsM1o6X0ML4jkovXWX/D5qDfbmZ7JCMw99k82BdWEplmw== X-YMail-OSG: bi3cBwwVM1mEyEoJEs5BwwInaeDcxGT2BQeFALizhfvGMaaMbt3Mj5hu3D8A7DQ xVxMPAoaXy50IsUTpIdsrupJXJnlHSEFaqF9M6s.0adFbYtmjxTf7mwNOPwn4o.HUrUPegBye_a8 gNp.E5FwHjKPwVvJFTcqeVZl2JEJO_sNTpB9cKQpYhScNbpxsdW9V0KsvVXUuNGr51_gMFvcnONK 50jb6T2p4vgZZgNa_KTDMV1aCJWbnUPYnjY0oGN5HFUpuyVK7d_jk9TlbNr6FcyOB27sRp5tCrUM NEqWS6lLir6XO0yHzwNXj6PehJziqxuain63_kSw6PlIb4zrrCwGZ_qYwC2MCcFKThq2FsKtaeKY wAGikeWRlaQV.845CWDOg3yweaZF9KUOdCd.YGj.a3uQmMe3haSy4KtaxeWc7fd7JaeHMphA6ZeG TqD9hIt6IG1fqWh3T9TytplPWXjNVl1sRU2G3I5Tz7SrhQSGBkZ8pnZ8fhfwcFlaTnku.Vt4yr_d wdUiJ_6y33pujvQzw90DHFonCw7NJLBPgagWsIvSHKFpoLhA25ngItNvIOyJ3ulan5ha_2zgUg6Z PMlBEd04hroI_iNtkwq_Ldsudh7dFh9BZSpX9wIfegREuJo11riKEeuyZqJRdQ2ZpO_AxP9ifBPX lpkq6jEYGEbOj0caM1S5j1bgTGyOL7nu2Ese8ByC9jQ94VAcfnXS8CPe29PdC39AsbZLDtIrEw8K xRaGbd94YuvaZ6UjwzTtmcPyYUcNncw3XVdUsmgBdzKn3em96fqznhzOmqwkGX_g0sAlBaJVSgWi SZhu9N5uUpy7Ih.4sR.oqqeVnjnhpboAyaoqTgpV0NQIdj5JU9NTnCstUMS2TQlgpTUdkfUaeUK0 pjknNJ3AD01wyMiMtrNGGLU3mFFWJqNwu0W0iiot6ysSx5aoMFmIrzeqBV6LCNQ9CJyvYYXmtpFm nLG0gkbl7Uqzqn2iWBakFeK4SKxKyI1w_sx9RtqSplx5ReAsEWKIrbIX7m6SAka772K4jP56d33c UkwFO98q1EGHEDvk.NYvK.GWy9I8..23l92ndhLltBWV8ZpbnbjyBR0pkn0hrUsEvbr9.sdgE2ol bEsBxZrfqRILLzLANMdSmIg_351rKHwyx From: Oliver Kiddle To: Zsh workers Subject: PATCH: update completions for newest BSD releases MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23606.1557352885.1@hydra> Date: Thu, 09 May 2019 00:01:25 +0200 Message-ID: <23607-1557352885.194794@dzYx.GFOU.ztyi> I did some fresh comparisons of -h help output for various utilities on the most recent BSD releases - DragonFly 5.4, FreeBSD 12 and OpenBSD 6.5. The following completion patch reflects the identified changes. As this included changes to _ping, this patch also covers changes that actually correspond to iputils 20180629 (ping and arping). Oliver diff --git a/Completion/BSD/Command/_cu b/Completion/BSD/Command/_cu index df38d6ed7..5876820e5 100644 --- a/Completion/BSD/Command/_cu +++ b/Completion/BSD/Command/_cu @@ -10,6 +10,7 @@ case $variant in args+=( "-d[don't block waiting for a carrier to be detected]" '-r[start cu in restricted mode - prevent local operations]' + '-E+[specify escape character]:escape character [~]' ) ;; taylor|(net|free)bsd*) @@ -18,7 +19,7 @@ case $variant in '(-e -P --parity)-o[use odd parity]' ) ;| - (net|free)bsd*) + dragonfly*|(net|free)bsd*) args+=( '-t[connect via a hard-wired connection to a host on a dial-up line]' ) ;| taylor|netbsd*) @@ -53,12 +54,8 @@ case $variant in '(-e -o --parity)-P+[set parity]:parity [none]:(even odd none)' ) ;; - freebsd*) - args=( -A "-*" $args - '-a[set the acu port]:acu' - '-h[echo characters locally]' - ) - ;; + dragonfly*|freebsd*) args+=( '-a[set the acu port]:acu' ) ;| + freebsd*) args=( -A "-*" $args '-h[echo characters locally]' ) ;; esac _arguments -s $args \ diff --git a/Completion/BSD/Command/_gstat b/Completion/BSD/Command/_gstat index c60e54422..238defce4 100644 --- a/Completion/BSD/Command/_gstat +++ b/Completion/BSD/Command/_gstat @@ -5,6 +5,7 @@ _arguments -s : \ '(-B)-b[batch mode]' \ '(-b)-B[endless batch mode]' \ '-c[enable the display geom(4) consumers]' \ + '(-b -B)-C[CSV output mode]' \ '-d[enable the display delete operations]' \ '-f+[filter by regex]:regex' \ '-o[enable the display for other operations]' \ diff --git a/Completion/BSD/Command/_procstat b/Completion/BSD/Command/_procstat index e16057635..a1708f6ac 100644 --- a/Completion/BSD/Command/_procstat +++ b/Completion/BSD/Command/_procstat @@ -6,8 +6,10 @@ _arguments -s -A "-*" -S \ '-e[show environment variables]' \ '-f[show file descriptor information]' \ '-i[show signal pending and disposition]' \ + '-j[show signal pending and blocked information for process threads]' \ '-k[show stacks of kernel threads]' \ '-l[show resource limits]' \ + "-L[show LWP info for the process pertaining to it's signal driven exit]" \ '-r[show resource usage]' \ '-s[show security credential information]' \ '-S[show cpuset information]' \ diff --git a/Completion/BSD/Command/_signify b/Completion/BSD/Command/_signify index 26571aa2a..6a786e2e1 100644 --- a/Completion/BSD/Command/_signify +++ b/Completion/BSD/Command/_signify @@ -3,29 +3,30 @@ _arguments -s -S -A "-*" : \ - checksum \ '-C[verify a signed checksum list and the checksum for each file]' \ - '-p[public key]:public key:_files' \ + '-p+[public key]:public key:_files' \ '-q[quiet mode]' \ - '-x[signature file]:signature file:_files' \ + '-x+[specify signature file]:signature file:_files' \ '*:file:_files' \ - generate \ '-G[generate a new key pair]' \ - '-c[specify comment]:comment:' \ - '-n[do not ask for passphrase]' \ - '-p[public key]:public key:_files' \ - '-s[secret key]:secret key:_files' \ + '-c+[specify comment]:comment' \ + "-n[don't ask for passphrase]" \ + '-p+[specify public key file]:public key:_files' \ + '-s+[specify secret key file]:secret key:_files' \ - sign \ '-S[sign a message and create a signature]' \ '-e[embed the message after the signature]' \ - '-m[file containing message]:message file:_files' \ - '-s[secret key]:secret key:_files' \ - '-x[signature file]:signature file:_files' \ + '-n[store a zero time stamp in the gzip(1) header (with -z)]' \ + '-m+[specify file containing message to sign]:message file:_files' \ + '-s+[specify secret key file]:secret key:_files' \ + '-x+[specify signature file]:signature file:_files' \ '-z[embed signature in gzip header]' \ - verify \ '-V[verify the message and signature match]' \ '-e[extract the message from the signature]' \ - '-m[file containing message to verify or destination to extract]:message file:_files' \ - '-p[public key]:public key:_files' \ + '-m+[specify file containing message to verify or destination to extract]:message file:_files' \ + '-p+[specify public key file]:public key:_files' \ '-q[quiet mode]' \ - '-t[restrict verification to specified key type]:key type:((base\:"base sets" fw\:firmware pkg\:packages syspatch\:syspatches))' \ - '-x[signature file]:signature file:_files' \ + '-t+[restrict verification to specified key type]:key type:((base\:"base sets" fw\:firmware pkg\:packages syspatch\:syspatches))' \ + '-x+[specify signature file]:signature file:_files' \ '-z[verify signature in gzip header]' diff --git a/Completion/BSD/Command/_sockstat b/Completion/BSD/Command/_sockstat index 913f3eb05..1d7973db7 100644 --- a/Completion/BSD/Command/_sockstat +++ b/Completion/BSD/Command/_sockstat @@ -13,6 +13,14 @@ case $OSTYPE in '-u[show AF_LOCAL (UNIX) sockets]' ) ;| + freebsd<12->.*) + args+=( + '-S[display the protocol stack if applicable]' + '-U[display the remote UDP encapsulation port number if applicable]' + '-v[verbose mode]' + '-w[use wider field size for displaying addresses]' + ) + ;| freebsd*) for proto in ${${(M)${(f)"$(*' '-/[preserve extended attributes and extended system attributes]' \ '(darwin|dragonfly|freebsd)*' "(-f -i)-n[don't overwrite existing file]" \ 'netbsd*' "-N[don't copy file flags]" \ - '(darwin|dragonfly|freebsd|netbsd)*' '-a[archive mode, same as -RpP]' \ + '(darwin|dragonfly|freebsd|netbsd|openbsd)*' '-a[archive mode, same as -RpP]' \ '(dragonfly|freebsd)*' '-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]" \ diff --git a/Completion/Unix/Command/_date b/Completion/Unix/Command/_date index a3e933710..91bd3b5f1 100644 --- a/Completion/Unix/Command/_date +++ b/Completion/Unix/Command/_date @@ -31,7 +31,7 @@ else freebsd*|dragonfly*|darwin*|netbsd*|openbsd*) opts+=( -A '-*' ) args+=( - '-j[do not try to set date]' + "-j[don't try to set date]" '2:format or date:->fmt_date' ) ;| @@ -41,6 +41,7 @@ else freebsd*|dragonfly*|darwin*|openbsd*) args+=( '-d+:daylight saving time value' + '-f+[use specified format for input]:parsing format:_date_formats:new date' '-t+:minutes west of GMT' ) ;| @@ -57,13 +58,11 @@ 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+=( - '-f+[use specified format for input]:parsing format:_date_formats:new date:' - '*-v+[adjust and print (but not set) date]:[+-]value[ymwdHMS]:' - ) + args+=( "*-v+[adjust and print (but don't set) date]:[+-]value[ymwdHMS]" ) ;; freebsd*|dragonfly*) args+=( '-R[display in RFC2822 format]' ) diff --git a/Completion/Unix/Command/_gcore b/Completion/Unix/Command/_gcore index 4933ffee6..72d11864b 100644 --- a/Completion/Unix/Command/_gcore +++ b/Completion/Unix/Command/_gcore @@ -37,7 +37,6 @@ case $OSTYPE in _arguments -s \ '-c+[write core file to specified file]:file:_files' \ '-f[dump all available segments]' \ - '-s[stop process while gathering image]' \ '::executable:' \ ':pid:_pids' ;; diff --git a/Completion/Unix/Command/_install b/Completion/Unix/Command/_install index 80a1b0c00..60b0f6153 100644 --- a/Completion/Unix/Command/_install +++ b/Completion/Unix/Command/_install @@ -64,14 +64,16 @@ else [[ $OSTYPE == (darwin|dragonfly)* ]] && args+=( '-M[disable use of mmap(2)]' ) + [[ $OSTYPE == (dragonfly|freebsd|netbsd)* ]] && args+=( + '(-C -c --compare)-l+[link files (rather than copy) using specified method]: :->linkflags' + '+N+[use user/group database files from specified directory]: :_directories' + '-U[indicate that install is unprivileged]' + ) [[ $OSTYPE == (freebsd|netbsd)* ]] && args+=( '-D+[specify destination directory used for metadata log]: :_directories' '-h+[store digest in metadata log using specified method]: :->digests' - '(-C -c --compare)-l+[link files (rather than copy) using specified method]: :->linkflags' '-M+[log mtree(8) metadata for installed files to specified file]:metadata log file:_files' - '+N+[use user/group database files from specified directory]: :_directories' '-T+[specify mtree(8) tags to store in metadata log]:mtree(8) tags' - '-U[indicate that install is unprivileged]' ) [[ $OSTYPE == netbsd* ]] || args+=( '-S[use temporary files to perform safe copy]' diff --git a/Completion/Unix/Command/_ls b/Completion/Unix/Command/_ls index cedea1de9..1fd9383f5 100644 --- a/Completion/Unix/Command/_ls +++ b/Completion/Unix/Command/_ls @@ -81,10 +81,14 @@ if ! _pick_variant gnu=gnu unix --help; then 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 if [[ $OSTYPE = dragonfly* ]]; then - arguments+=( '-y[display FSMID in long listing]' ) + arguments+=( + '-_[use GMT based date and time output with nanotime timestamp]' + '-y[display FSMID in long listing]' + ) fi if [[ $OSTYPE = (freebsd*|darwin*) ]]; then arguments+=( '(-c -u)-U[file creation time]' ) @@ -92,9 +96,9 @@ if ! _pick_variant gnu=gnu unix --help; then if [[ $OSTYPE = freebsd* ]]; then arguments+=( '-,[print file sizes grouped and separated by thousands]' - '-D+[specify format for date]:format: _date_formats' '-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 diff --git a/Completion/Unix/Command/_netstat b/Completion/Unix/Command/_netstat index c03aae9a2..7342a8a22 100644 --- a/Completion/Unix/Command/_netstat +++ b/Completion/Unix/Command/_netstat @@ -269,6 +269,7 @@ case $OSTYPE in ) interfaces+=( '-c+[show specified number of updates, then exit]:count' + '-e[show only the number of errors on the interface]' '-q[only show interfaces that have seen packets]' '-t[show current value of the watchdog timer function]' ) diff --git a/Completion/Unix/Command/_ping b/Completion/Unix/Command/_ping index 78fd33d92..3cb6e1008 100644 --- a/Completion/Unix/Command/_ping +++ b/Completion/Unix/Command/_ping @@ -11,6 +11,7 @@ case ${variant}:${${service#ping}:-4} in args+=( '-d[set SO_DEBUG on the socket]' '-n[show network addresses as numbers]' + '-M+[define mtu discovery]:mtu discovery:(do dont want)' '-v[verbose output]' ) ;| @@ -104,9 +105,11 @@ case ${variant}:${${service#ping}:-4} in '-z+[specify type of service]:type of service' ) ;| + (freebsd|openbsd|darwin)*:6) + args+=( '-D[disable IPv6 fragmentation]' ) + ;| (freebsd|darwin)*:6) args+=( - '-D[disable IPv6 fragmentation]' '-R[audible bell for no packet]' '-r[audible bell for each packet]' ) @@ -149,16 +152,12 @@ case ${variant}:${${service#ping}:-4} in '--apple-time[prints the time a packet was received]' ) ;; - openbsd*:4) - args+=( - '-T+[change TOS value]:TOS value:(critical inetcontrol lowdelay netcontrol throughput reliability ef af cs)' - ) - ;| openbsd*) args+=( '-H[try reverse-lookups of addresses]' '-E[audible bell for no packet]' '-e[audible bell for each packet]' + '-T+[change TOS value]:TOS value:(critical inetcontrol lowdelay netcontrol throughput reliability ef af cs)' '-V+[specify routing table to be used]:routing table' ) ;; diff --git a/Completion/Unix/Command/_script b/Completion/Unix/Command/_script index 436c9661b..ac3bf3973 100644 --- a/Completion/Unix/Command/_script +++ b/Completion/Unix/Command/_script @@ -34,10 +34,6 @@ case $OSTYPE in darwin*|dragonfly*|netbsd*|freebsd*) args=( '-q[be quiet: suppress display of starting and ending lines]' - ) - ;| - darwin*|netbsd*|freebsd*) - args+=( '(-a -r -k)-d[suppress sleeps when playing back a session]' '(-a -r -k -t)-p[play back a recorded session]' '(-d -p)-r[record a session with input, output and timing data]' @@ -58,13 +54,13 @@ case $OSTYPE in ;| darwin*|dragonfly*|freebsd*) args+=( + '-F[send output to specified named pipe]:fifo:_files -g "*(p)"' '-t+[specify interval of data flushing]:interval (seconds)' '-k[log keys sent to the program as well as output]' '*:::arguments: _normal' ) ;| darwin*|freebsd*) - args+=( '-F[send output to specified named pipe]:fifo:_files -g "*(p)"' ) ;| *) args+=( diff --git a/Completion/Unix/Command/_tcpdump b/Completion/Unix/Command/_tcpdump index 4b9950fa5..9aad84d7b 100644 --- a/Completion/Unix/Command/_tcpdump +++ b/Completion/Unix/Command/_tcpdump @@ -134,6 +134,7 @@ if [[ $OSTYPE = openbsd* ]]; then - capture ${(R)args:#(|\*)(|\(*\))--*} # removes any long-options '(-n)-a[attempt to convert network and broadcast addresses to names]' + '-B+[specify drop action to be used when filter expression matches a packet]:drop action:(pass capture drop)' '-D[select packet flowing in specified direction]:direction:(in out)' '-I[print the interface on each dump line]' '-o[print a guess of the possible operating system(s)]' diff --git a/Completion/Unix/Command/_top b/Completion/Unix/Command/_top index 4064c408d..652432166 100644 --- a/Completion/Unix/Command/_top +++ b/Completion/Unix/Command/_top @@ -65,6 +65,7 @@ case $OSTYPE in '-i[interactive mode]' '-n[non-interactive mode (identical to batch mode)]' '-o+[sort process display by the specified field]:field:( $fields )' + '-p+[filter by the specified pid]: :_pids' '-q[renice top to -20]' '-S[show system processes]' '-s+[specify delay interval]:seconds:' @@ -92,7 +93,6 @@ case $OSTYPE in '-1[combine CPU statistic into one line]' '-C[show command arguments as well as process name]' '-g+[filter processes by the specified string]:string' - '-p+[filter by the specified pid]: :_pids' '-U+[filter processes by the specified user]: :_users -M "L\:|-="' );; darwin*) diff --git a/Completion/Unix/Command/_vmstat b/Completion/Unix/Command/_vmstat index 7d3008592..bc13a5505 100644 --- a/Completion/Unix/Command/_vmstat +++ b/Completion/Unix/Command/_vmstat @@ -21,10 +21,9 @@ case $OSTYPE in '(- :)'{-D,--disk-sum}'[summarize disk statistics]' ) ;; - *bsd*) + *bsd*|dragonfly*) specs=( '-c+[specify number of times to refresh the display]:count' - '-f[report on the number fork syscalls since boot and pages of virtual memory for each]' '-i[report the number of interrupts taken by devices since boot]' '-M+[specify core file to extract values associated with the name list from]:core:_files' '-N+[specify file to extract the name list from]:system:_files' @@ -32,18 +31,27 @@ case $OSTYPE in '*:disk:_files' ) ;| + *bsd*) + specs=( + '-f[report on the number fork syscalls since boot and pages of virtual memory for each]' + ) + ;| + freebsd*|dragonfly*) + specs+=( + '-m[report on the usage of kernel dynamic memory allocated using malloc(9) by type]' + '-n+[change the maximum number of disks to display]:number of disks to display [2]' + '*-p+[specify which types of devices to display]: :->devices' + '-s[display the contents of the SUM structure]' + '-z[report on memory used by the kernel zone allocator, uma(9), by zone]' + ) + ;| freebsd*) specs+=( '-a[include statistics about all interrupts]' '-h[human readable memory columns output]' '-H[scriptable memory columns output]' - '-m[report on the usage of kernel dynamic memory allocated using malloc(9) by type]' - '-n+[change the maximum number of disks to display]:number of disks to display' '-o[list virtual memory objects]' '-P[report per-cpu system/user/idle cpu statistics]' - '-p+[specify which types of devices to display]: :->devices' - '-s[display the contents of the SUM structure]' - '-z[report on memory used by the kernel zone allocator, uma(9), by zone]' ) ;| (net|open)bsd*) @@ -73,6 +81,14 @@ case $OSTYPE in '-W[print more information about kernel memory pools]' ) ;; + dragonfly*) + specs+=( + '-b[use brief format for formatted numbers]' + '-o[report usage of kernel object cache]' + '-u[output unformatted numeric values]' + '-v[include IRQ numbers and IRQ target CPU numbers before device names (with -i)]' + ) + ;; freebsd*|solaris*) specs+=( '::disk:_files -W /dev -g "*(-%b)"' diff --git a/Completion/Unix/Command/_zpool b/Completion/Unix/Command/_zpool index ec8e6797f..dfb99e510 100644 --- a/Completion/Unix/Command/_zpool +++ b/Completion/Unix/Command/_zpool @@ -14,7 +14,7 @@ _zpool() { ) if [[ $implementation = openzfs ]] && [[ $OSTYPE != solaris* ]]; then - subcmds+=(labelclear) + subcmds+=( labelclear initialize ) fi versions=( @@ -160,6 +160,14 @@ _zpool() { '::pool name:_zfs_pool' ;; + (initialize) + _arguments -A "-*" \ + '(-c --cancel)'{-c,--cancel}'[cancel initializing on specified devices]' \ + '(-s --suspend)'{-s,--suspend}'[suspend initializing on specified devices]' \ + ':pool name:_zfs_pool' \ + '*:device:_files' + ;; + (iostat) _arguments -A "-*" \ '-l[Display configuration in /dev/chassis location form]' \