From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 1659 invoked from network); 10 Oct 2023 22:25:58 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 10 Oct 2023 22:25:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Message-ID:Date: Content-Transfer-Encoding:Content-ID:Content-Type:MIME-Version:Subject:To: From:Reply-To:Cc:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=CjYZY9Cs7R9y6boFZ9fNRR6GKo0vHOnsZKT3/NOGY8k=; b=ikWzBtD4um+cVzEP48hSHjlsjt qnN27ZiNqUlXuahehnXUeDCf0S/NZvk4lQ7zSbJq0lClfNWKJpq9mroiaVEwUmg0qQ8czpRMeqCRY 5UKN08LGVZXTuSLgE2rpWU3ni2ebkLOGO+gh+nTJ4yAm98uFYa0GTyzMLE3AFbqSmYaWjEaC6t6FX Vr59OFc07vjIbsSiSHciaXkNeKFzdVipXeZ6pfERB1t9QE+k2EKlmkZ9lpVFtrONEN9wOHYAChrAs sKcsSYpNv0UkCoTLGp6GADZoeUo/BuPFN8fyALZQUgVm77B6Akg68mzeBxeGkS5DCRKL+ZFgumuaR tRScn4OQ==; Received: by zero.zsh.org with local id 1qqLAr-0005Fb-Qv; Tue, 10 Oct 2023 22:25:57 +0000 Received: by zero.zsh.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1qqLAF-0004w1-FV; Tue, 10 Oct 2023 22:25:19 +0000 Received: from [192.168.178.21] (helo=hydra) by mail.kiddle.eu with esmtp(Exim 4.95) (envelope-from ) id 1qqLAF-000MXk-3m for zsh-workers@zsh.org; Wed, 11 Oct 2023 00:25:19 +0200 From: Oliver Kiddle To: Zsh workers Subject: PATCH: update completion for FreeBSD 14 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <86658.1696976719.1@hydra> Content-Transfer-Encoding: quoted-printable Date: Wed, 11 Oct 2023 00:25:19 +0200 Message-ID: <86659-1696976719.103216@S-QD.QE_N.2-ED> X-Seq: 52217 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: In addition to new options in FreeBSD 14.0 (or at least the current beta), this also covers some things that were added in later 13.x releases and even earlier. The dummynet part of ipfw is now applicable also to pf and there's a new dnctl utility so ipfw completion now also handles that. mktemp completion got rearranged somewhat. Otherwise, just options added or removed here and there. Oliver diff --git a/Completion/BSD/Command/_freebsd-update b/Completion/BSD/Comma= nd/_freebsd-update index 7dd907298..af37641e4 100644 --- a/Completion/BSD/Command/_freebsd-update +++ b/Completion/BSD/Command/_freebsd-update @@ -17,6 +17,7 @@ _arguments \ '-d[store working files in workdir]:workdir:_files -/' \ '-f[read configuration options from conffile]:conf file:_files' \ '-F[force freebsd-update fetch to proceed where it normally would not]'= \ + '-j[operate on specified jail]: :_jails' \ '-k[trust an RSA key with SHA256 of KEY]:RSA key' \ '-r[specify the new release]:new release' \ '-s[fetch files from the specified server or server pool]:server:_hosts= ' \ diff --git a/Completion/BSD/Command/_ipfw b/Completion/BSD/Command/_ipfw index 49d0ef1e8..b910aa34d 100644 --- a/Completion/BSD/Command/_ipfw +++ b/Completion/BSD/Command/_ipfw @@ -1,7 +1,7 @@ -#compdef ipfw +#compdef ipfw dnctl = local word=3D$'/[^ \t\0]#[ \t\0]/' comma next pqs nat -local -a actions address pathname ropts ca +local -a actions address dummynet args ropts ca local -A opt_args nat_options = _ipfw_tables() { @@ -80,6 +80,46 @@ address=3D( \| \) ) = +dummynet=3D( + $'/(pipe|queue|sched)[ \t\0]/' -'pqs=3D${match%?}' ':dummynet-commands:= dummynet configuration:$ca pipe queue sched' + $word ': _message -e numbers number' + $word ':options:config:$ca config' + \( $'/bw[ \t\0]/' + \( $word ':bandwidths: :_numbers -M "m:{a-z}=3D{A-Z}" bandwidth {K,M,= G}{bit,Byte}/s' + \| $word ':devices:device:_net_interfaces -qS " "' \) + \| $'/delay[ \t\0]/' $word ': _message -e numbers "propagation delay (m= s)"' + \| $'/burst[ \t\0]/' $word ': _message -e numbers "size (bytes)"' + \| $'/profile[ \t\0]/' $word ':files:file:_files -qS " "' + \| $'/pipe[ \t\0]/' $word ': _message -e pipes pipe' + \| $'/weight[ \t\0]/' $word ': _message -e weights "weight (1-100) [1]"= ' + \| $'/type[ \t\0]/-' + \( $'/fq_(pie|codel)[ \t\0]/' + \( $'/limit[ \t\0]/' $word ': _message -e numbers "limit (packets) = [10240]"' + \| $'/flows[ \t\0]/' $word ': _message -e numbers "flow queues [102= 4]"' + \| $'/quantum[ \t\0]/' ':parameters:parameter:$ca -F line quantum l= imit flows' \) \# + '/[]/' + \| $word ':types:scheduling algorithm:$ca fifo wf2q+ rr qfq fq_codel = fq_pie fq_codel' \) + \| $'/buckets[ \t\0]/' $word ': _message -e sizes "hash table size (16-= 65536)"' + \| $'/mask[ \t\0]/' $word ':mask-specifiers:mask specifier:$ca dst-ip d= st-ip6 src-ip src-ip6 dst-port src-port flow-id proto all' + \| $'/plr[ \t\0]/' $word ': _message -e numbers "packet loss rate (0.0-= 1.0)"' + \| $'/queue[ \t\0]/' $word ': _message -e sizes "queue size"' + \| $'/(red|gred)[ \t\0]/' $word ': _message -e thresholds thresholds' + \| $'/codel[ \t\0]/' + \( $'/(target|interval)[ \t\0]/' $word ': _message -e times "time (ms= )"' + \| $'/(ecn|noecn)[ \t\0]/' ':options:option:$ca -F line target interv= al ecn noecn' \) \# + '/[]/' + \| $'/pie[ \t\0]/' + \( $'/(target|tupdate|max_burst)[ \t\0]/' $word ': _message -e times = "time"' + \| $'/(alpha|beta)[ \t\0]/' $word ': _message -e weights weight' + \| $'/max_ecnth[ \t\0]/' $word ': _message -e probabilities probabili= ty' + \| $word ':options:option:$ca -F line alpha beta max_burst max_ecnth = {,no}{ecn,capdrop,drand} onoff dre ts' \) \# + '/[]/' + \| // '-[[ $pqs =3D pipe ]]' $'/noerror[ \t\0]/' ':options:option:$ca -= F line bw delay burst profile buckets mask noerror plr queue red gred code= l pie' + \| // '-[[ $pqs =3D queue ]]' $'/noerror[ \t\0]/' ':options:option:$ca = -F line pipe weight buckets mask noerror plr queue red gred codel pie' + \| // '-[[ $pqs =3D sched ]]' $'/[]/' ':options:option:$ca -F line type= bw delay burst profile' + \) \# +) + actions=3D( $'/[^\0]##\0(-[a-zA-Z0-9]##[ \t]#)#/' # skip over options, completed by= _arguments but can \( # be quoted in one argument which= that doesn't handle @@ -241,48 +281,14 @@ actions=3D( \| $'/redirect_proto[ \t\0]/' $word ':protocols:protocol:$ca sctp= tcp udp' $word ': _message -e ip-addresses "IP address"' $word ': _message -e ip-addresses "IP address"' - \| $word ':parameters:config parameter:$ca ip if log deny_in same= _ports unreg_only unreg_cgn reset reverse proxy_only skip_global redirect_= port redirect_addr redirect_proto' + \| $'/port_range[ \t\0]/' + '/[0-9]#-/' ': _message -e ports lower' + $word ': _message -e ports upper' + \| $word ':parameters:config parameter:$ca ip if log deny_in same= _ports unreg_only unreg_cgn reset reverse proxy_only skip_global redirect_= port redirect_addr redirect_proto port_range' \) \# \| $'/show[ \t\0]/' $word ':actions:action:(config log)' \| '/[]/' ':commands:command:$ca config show' \) - \| # dummynet configuration - $'/(pipe|queue|sched)[ \t\0]/' -'pqs=3D${match%?}' ':dummynet-command= s:dummynet configuration:$ca pipe queue sched' - $word ': _message -e numbers number' - $word ':options:config:$ca config' - \( $'/bw[ \t\0]/' - \( $word ':bandwidths: :_numbers -M "m:{a-z}=3D{A-Z}" bandwidth {K,= M,G}{bit,Byte}/s' - \| $word ':devices:device:_net_interfaces -qS " "' \) - \| $'/delay[ \t\0]/' $word ': _message -e numbers "propagation delay = (ms)"' - \| $'/burst[ \t\0]/' $word ': _message -e numbers "size (bytes)"' - \| $'/profile[ \t\0]/' $word ':files:file:_files -qS " "' - \| $'/pipe[ \t\0]/' $word ': _message -e pipes pipe' - \| $'/weight[ \t\0]/' $word ': _message -e weights "weight (1-100) [1= ]"' - \| $'/type[ \t\0]/-' - \( $'/fq_(pie|codel)[ \t\0]/' - \( $'/limit[ \t\0]/' $word ': _message -e numbers "limit (packets= ) [10240]"' - \| $'/flows[ \t\0]/' $word ': _message -e numbers "flow queues [1= 024]"' - \| $'/quantum[ \t\0]/' ':parameters:parameter:$ca -F line quantum= limit flows' \) \# - '/[]/' - \| $word ':types:scheduling algorithm:$ca fifo wf2q+ rr qfq fq_code= l fq_pie fq_codel' \) - \| $'/buckets[ \t\0]/' $word ': _message -e sizes "hash table size (1= 6-65536)"' - \| $'/mask[ \t\0]/' $word ':mask-specifiers:mask specifier:$ca dst-ip= dst-ip6 src-ip src-ip6 dst-port src-port flow-id proto all' - \| $'/plr[ \t\0]/' $word ': _message -e numbers "packet loss rate (0.= 0-1.0)"' - \| $'/queue[ \t\0]/' $word ': _message -e sizes "queue size"' - \| $'/(red|gred)[ \t\0]/' $word ': _message -e thresholds thresholds' - \| $'/codel[ \t\0]/' - \( $'/(target|interval)[ \t\0]/' $word ': _message -e times "time (= ms)"' - \| $'/(ecn|noecn)[ \t\0]/' ':options:option:$ca -F line target inte= rval ecn noecn' \) \# - '/[]/' - \| $'/pie[ \t\0]/' - \( $'/(target|tupdate|max_burst)[ \t\0]/' $word ': _message -e time= s "time"' - \| $'/(alpha|beta)[ \t\0]/' $word ': _message -e weights weight' - \| $'/max_ecnth[ \t\0]/' $word ': _message -e probabilities probabi= lity' - \| $word ':options:option:$ca -F line alpha beta max_burst max_ecnt= h {,no}{ecn,capdrop,drand} onoff dre ts' \) \# - '/[]/' - \| // '-[[ $pqs =3D pipe ]]' $'/noerror[ \t\0]/' ':options:option:$ca= -F line bw delay burst profile buckets mask noerror plr queue red gred co= del pie' - \| // '-[[ $pqs =3D queue ]]' $'/noerror[ \t\0]/' ':options:option:$c= a -F line pipe weight buckets mask noerror plr queue red gred codel pie' - \| // '-[[ $pqs =3D sched ]]' $'/[]/' ':options:option:$ca -F line ty= pe bw delay burst profile' - \) \# + \| $dummynet \| # sysctl shortcuts $'/(en|dis)able[ \t\0]/' ':sysctl-shortcuts:sysctl shortcut:$ca enabl= e disable' $word ':values:value:(firewall altq one_pass debug verbose dyn_keepal= ive)' @@ -292,11 +298,36 @@ actions=3D( \) ) = -if (( $words[(I)-p*] )); then - pathname=3D( ':path:_files -P / -W /' ) -fi +case $service in + ipfw) + _regex_arguments _ipfw_actions "$actions[@]" + args=3D( + '!-e' # nop for compatibility + '(-p)-a[show counter values when listing rules (implied by show)]' + '(-p)-b[show only the action and the comment]' + '-c[show rules in compact form]' + '(-p)-d[show dynamic rules in addition to static ones]' + '(-p)-D[act on dynamic states only]' + '-f[run without confirmation]' + '(-p)-i[format values as IP addresses in table listings]' + '-N[resolve addresses and service names in output]' + '-q[quiet output]' + '-S[show the set each rule belongs to]' + '(-p -T)-t[show timestamp of last match, ctime() format]' + '(-p -t)-T[show timestamp of last match as seconds since epoch]' + '(-a -b -d -D -i -s -t -T *)-p+[specify preprocessor]:preprocessor:= _command_names -e' + ) + if (( $words[(I)-p*] )); then + args+=3D( ':path:_files -P / -W /' ) + fi + ;; + dnctl) + _regex_arguments _ipfw_actions \ + $'/[^\0]##\0(-[a-zA-Z0-9]##[ \t]#)#/' \ + "$dummynet[@]" + ;; +esac = -_regex_arguments _ipfw_actions "$actions[@]" = if [[ -prefix *[$' \t']* ]]; then # This allows from things like ipfw "-n add..." @@ -304,22 +335,10 @@ if [[ -prefix *[$' \t']* ]]; then return fi = -_arguments -s $pathname \ - '(-p)-a[show counter values when listing rules (implied by show)]' \ - '(-p)-b[show only the action and the comment]' \ - '-c[show rules in compact form]' \ - '(-p)-d[show dynamic rules in addition to static ones]' \ - '(-p)-D[act on dynamic states only]' \ - '-f[run without confirmation]' \ +_arguments -s $args \ '(- *)-h[display syntax summary]' \ - '(-p)-i[format values as IP addresses in table listings]' \ '-n[only check syntax, make no changes]' \ - '-N[resolve addresses and service names in output]' \ - '-q[quiet output]' \ - '-S[show the set each rule belongs to]' \ '(-p)-s+[sort pipes by field]:field (negative reverses):((0\:unsorted 1= \:packets 2\:bytes 3\:total\ packets 4\:total\ bytes))' \ - '(-p -T)-t[show timestamp of last match, ctime() format]' \ - '(-p -t)-T[show timestamp of last match as seconds since epoch]' \ - '(-a -b -d -D -i -s -t -T *)-p+[specify preprocessor]:preprocessor:_com= mand_names -e' \ + '-v[verbose]' \ '*:::actions:=3D _ipfw_actions' = diff --git a/Completion/BSD/Command/_pfctl b/Completion/BSD/Command/_pfctl index 812e52bdb..8063eb504 100644 --- a/Completion/BSD/Command/_pfctl +++ b/Completion/BSD/Command/_pfctl @@ -91,7 +91,10 @@ case $OSTYPE in ) ;| freebsd*) - args+=3D( '-P[display ports numerically]' ) + args+=3D( + '-M[kill matching states in the opposite direction]' + '-P[display ports numerically]' + ) ;; esac = diff --git a/Completion/BSD/Command/_sockstat b/Completion/BSD/Command/_so= ckstat index 1d7973db7..f372fe1b3 100644 --- a/Completion/BSD/Command/_sockstat +++ b/Completion/BSD/Command/_sockstat @@ -21,6 +21,14 @@ case $OSTYPE in '-w[use wider field size for displaying addresses]' ) ;| + freebsd<13->.*) + args+=3D( + '-C[display the congestion control module]' + '-i[display the inp_gencnt]' + "-n[don't resolve numeric UIDs to user names]" + '-q[quiet mode, do not print the header line]' + ) + ;| freebsd*) for proto in ${${(M)${(f)"$(.*) + args+=3D( '(-C)-j+[perform actions inside jail]:jail:_jails' ) + ;; dragonfly*) args+=3D( '-n[disable auto-loading of kernel network interface driver= ]' ) ;; diff --git a/Completion/Unix/Command/_iostat b/Completion/Unix/Command/_io= stat index 1152b0d8b..d3943fcb4 100644 --- a/Completion/Unix/Command/_iostat +++ b/Completion/Unix/Command/_iostat @@ -34,7 +34,6 @@ case $OSTYPE:l in args+=3D( '-x[show extended disk statistics]' '-z[omit lines for devices with no activity]' - '(* -)-?[display a usage statement and exit]' ) ;; dragonfly*) @@ -126,6 +125,7 @@ case $OSTYPE:l in parser=3D( -s ) args=3D( '-c[display CPU utilization report]' + "--compact[don't break into sub-reports keeping metrics to a single= line]" '-d[display device utilization report]' '--dec=3D-[specify the number of decimal places to use]:decimal pla= ces [2]:(0 1 2)' '-f[specify alternative directory to read device statistics from]:d= irectory:_directories' diff --git a/Completion/Unix/Command/_ldd b/Completion/Unix/Command/_ldd index 3c7b088df..98ac41e14 100644 --- a/Completion/Unix/Command/_ldd +++ b/Completion/Unix/Command/_ldd @@ -30,8 +30,7 @@ else freebsd*) args=3D( '-a[show all objects that are needed by each loaded object]' - '-v[verbose listing of the dynamic linking headers]' - '-f+[specify format]:format:((%a\:program\ name %A\:environment\ name %o= \:library\ name %p\:path\ to\ library %x\:load\ address))' + '*-f+[specify format]:format:((%a\:program\ name %A\:environment\ name %= o\:library\ name %p\:path\ to\ library %x\:load\ address))' ) ;; esac diff --git a/Completion/Unix/Command/_ls b/Completion/Unix/Command/_ls index df14e7e2c..975a28196 100644 --- a/Completion/Unix/Command/_ls +++ b/Completion/Unix/Command/_ls @@ -96,6 +96,7 @@ if ! _pick_variant gnu=3Dgnu unix --help; then if [[ $OSTYPE =3D freebsd* ]]; then arguments+=3D( '-,[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=3D-[control use of color]:color:(never always auto)' @@ -163,12 +164,12 @@ else '(-a --all -U -l --format -s --size -t --sort --full-time)-f[unsorted= , all, short list]' '(--reverse -r -U -f)'{--reverse,-r}'[reverse sort order]' = - '(--sort -t -U -v -X)-S[sort by size]' - '(--sort -S -U -v -X)-t[sort by modification time]' - '(--sort -S -t -v -X)-U[unsorted]' - '(--sort -S -t -U -X)-v[sort by version (filename treated numerically= )]' - '(--sort -S -t -U -v)-X[sort by extension]' - '(-S -t -U -v -X)--sort=3D[specify sort key]:sort key:(size time none= version extension)' + '(--sort -f -t -U -v -X)-S[sort by size]' + '(--sort -f -S -U -v -X)-t[sort by modification time]' + '(--sort -f -S -t -v -X)-U[unsorted]' + '(--sort -f -S -t -U -X)-v[sort by version (filename treated numerica= lly)]' + '(--sort -f -S -t -U -v)-X[sort by extension]' + '(-S -f -t -U -v -X)--sort=3D[specify sort key]:sort key:(size time n= one version extension)' = '--color=3D-[control use of color]:color:(never always auto)' "*--hide=3D[like -I, but overridden by -a or -A]:pattern: " diff --git a/Completion/Unix/Command/_mktemp b/Completion/Unix/Command/_mk= temp index 03fc89e36..0f66d744e 100644 --- a/Completion/Unix/Command/_mktemp +++ b/Completion/Unix/Command/_mktemp @@ -1,43 +1,45 @@ #compdef mktemp gmktemp = local variant -local args +local -a args = -_pick_variant -r variant busybox=3DBusyBox gnu=3D'Free Soft' unix --versi= on +_pick_variant -r variant busybox=3DBusyBox gnu=3D'Free Soft' $OSTYPE --ve= rsion = args=3D( '(-d --directory)'{-d,--directory}'[make directory instead of file]' - '(: -)--help[display help information]' - '(-p --tmpdir)'{-p+,--tmpdir=3D}'[make relative to specified directory]= : :_directories' '(-q --quiet)'{-q,--quiet}'[suppress error messages]' - '--suffix=3D[append specified suffix to template]:template suffix' - '-t[interpret template as single path component relative to temp dir]' '(-u --dry-run)'{-u,--dry-run}'[print file name only]' - '(: -)'{-V,--version}'[display version information]' - '1: :_guard "^-*" "template name"' ) = -# Non-GNU variants don't support long options (except BusyBox's --help) -if [[ $variant =3D=3D *busybox* ]]; then # See also: _busybox - args=3D( ${args:#((#s)|*\))(\*|)--^help*} ) -elif [[ $variant !=3D gnu ]]; then - args=3D( ${args:#((#s)|*\))(\*|)--*} ) -fi - -[[ $variant =3D=3D gnu ]] || { - # BusyBox, OpenBSD, and Solaris have -p, but -t doesn't take an argumen= t - if [[ $variant =3D=3D *busybox* ]] || [[ $OSTYPE =3D=3D (openbsd|solari= s)* ]]; then - args=3D( ${args:#((#s)|*\))(\*|)-t*} ) - args+=3D( '-t[generate template relative to temp dir]' ) - # Dragonfly, FreeBSD, and Darwin take an argument to -t and support any= number - # of template files. These OSes do not have -p and -V. - else - args=3D( ${args:#((#s)|*\))(1:*|(\*|)-[ptV]*)} ) +case $variant in + ^(dragonfly|darwin)*) + args+=3D( '(-p --tmpdir)'{-p+,--tmpdir=3D}'[make relative to specifie= d directory]: :_directories' ) + ;| + gnu) + args+=3D( + '--suffix=3D[append specified suffix to template]:template suffix' + '(: -)'{-V,--version}'[display version information]' + ) + ;| + # Most variants don't support long options (except BusyBox's --help) + ^(gnu|freebsd*)) + args=3D( ${args:#((#s)|*\))(\*|)--*} ) + ;| + gnu|*busybox*) + args+=3D( '(: -)--help[display help information]' ) + ;| + (gnu|*busybox|openbsd|solaris)*) + args+=3D( + '-t[generate template relative to temp dir]' + '1: :_guard "^-*" "template name"' + ) + ;; + (dragonfly|netbsd|freebsd|darwin)*) args+=3D( '-t[generate template relative to temp dir using specified prefix]:= template prefix' '*: :_guard "^-*" "template name"' ) - fi -} + ;; +esac = _arguments -s -S : $args diff --git a/Completion/Unix/Command/_netstat b/Completion/Unix/Command/_n= etstat index 8016b2475..35d639f99 100644 --- a/Completion/Unix/Command/_netstat +++ b/Completion/Unix/Command/_netstat @@ -302,6 +302,9 @@ case $OSTYPE in memory+=3D( $Xopt) statistics+=3D( $Xopt ) pcb+=3D( $Mopts $popt ) ;; + freebsd<14->.*) + args+=3D( '-j+[run inside a jail]:jail:_jails' ) + ;& freebsd<13->.*) sockets+=3D( '-c[show TCP stack used for each session]' diff --git a/Completion/Unix/Command/_script b/Completion/Unix/Command/_sc= ript index f39cfe535..d38d56f2e 100644 --- a/Completion/Unix/Command/_script +++ b/Completion/Unix/Command/_script @@ -47,7 +47,7 @@ case $OSTYPE in '-q[be quiet: suppress display of starting and ending lines]' '(-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]' + '(-d -p -T)-r[record a session with input, output and timing data]' ) ;| netbsd*|openbsd*) @@ -60,7 +60,9 @@ case $OSTYPE in ;| freebsd*) args+=3D( + '-e[return exit status of the child process]' '-f[use filemon(4)]' + '(-a -r -k -t)-T[play back a recorded session, reporting only times= tamps]: :_date_formats' ) ;| darwin*|dragonfly*|freebsd*) @@ -71,8 +73,6 @@ case $OSTYPE in '*:::arguments: _normal $service' ) ;| - darwin*|freebsd*) - ;| *) args+=3D( '(-p -d)-a[append output]' diff --git a/Completion/Unix/Command/_service b/Completion/Unix/Command/_s= ervice index 1216f57a8..28563429b 100644 --- a/Completion/Unix/Command/_service +++ b/Completion/Unix/Command/_service @@ -10,8 +10,11 @@ zstyle -T ":completion:${ctx}" tag-order && \ zstyle ":completion:${ctx}" tag-order init = case $OSTYPE in + freebsd<14->.*) + args=3D( '-E+[set environment variable before executing the rc.d scri= pt]:variable:_parameters -g "*export*~*readonly*" -S=3D' ) + ;& freebsd<11->.*) - args=3D( '-j+[perform actions in specified jail]:jail:_jails' ) + args+=3D( '-j+[perform actions in specified jail]:jail:_jails' ) ;& freebsd*|dragonfly*) actions=3D( diff --git a/Completion/Unix/Command/_split b/Completion/Unix/Command/_spl= it index c5ab0dc9b..5ecc1bb67 100644 --- a/Completion/Unix/Command/_split +++ b/Completion/Unix/Command/_split @@ -8,7 +8,7 @@ _pick_variant -r variant gnu=3DGNU $OSTYPE --version = args=3D( '-a+[generate suffixes of specified length]:length [2]' \ - '(-l -p -n)-b+[put specified size in bytes in each output file]:size (b= ytes)' \ + '(-l -p -n)-b+[put specified size in bytes in each output file]: :_numb= ers -u bytes size k m g' \ '(-b -p -n)-l+[put specified number of lines/records in each output fil= e]:lines' \ '1:file:_files' \ '2: :_guard "^-*" "prefix [x]"' @@ -19,8 +19,8 @@ case $variant in args=3D( -C '(H -a --suffix-length)'{-a+,--suffix-length=3D}'[generate suffixes= of specified length]:length [2]' '(H)--additional-suffix=3D[append an additional suffix to file name= s]:suffix' - '(H -b --bytes -C --line-bytes -l --lines -n --number)'{-b+,--bytes= =3D}'[put specified size in bytes in each output file]:size (bytes)' - '(H -b --bytes -C --line-bytes -l --lines -n --number)'{-C+,--line-= bytes=3D}'[put whole lines/records up to size limit in each output file]:s= ize (bytes)' + '(H -b --bytes -C --line-bytes -l --lines -n --number)'{-b+,--bytes= =3D}'[put specified size in each output file]: :_numbers -M "m\:{a-zA-Z}=3D= {A-Za-z}" -u bytes size {K,M,G,T,P,E,Z}{,B}' \ + '(H -b --bytes -C --line-bytes -l --lines -n --number)'{-C+,--line-= bytes=3D}'[put whole lines/records up to size limit in each output file]: = :_numbers -M "m\:{a-zA-Z}=3D{A-Za-z}" -u bytes size {K,M,G,T,P,E,Z}{,B}' '(H --numeric-suffixes -x --hex-suffixes)-d[use numeric suffixes st= arting at 0]' '(H -d -x --hex-suffixes)--numeric-suffixes=3D-[use numeric suffixe= s]::start value [0]' '(H -d --numeric-suffixes --hex-suffixes)-x[use hex suffixes starti= ng at 0]' @@ -47,7 +47,12 @@ case $variant in '(-b -l -n)-p+[split the file whenever a line matches specified pat= tern]:pattern' ) ;| - freebsd*) args+=3D( '-d[use numeric suffixes]' ) ;; + freebsd*) + args+=3D( + '-d[use numeric suffixes]' + "-c[continue creating files and don't overwrite existing output fil= es]" + ) + ;; esac = _arguments -s -S $args && ret=3D0 diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh index 0ba1f3775..dc3979a58 100644 --- a/Completion/Unix/Command/_ssh +++ b/Completion/Unix/Command/_ssh @@ -57,7 +57,7 @@ _ssh () { "-N[don't execute a remote command]" \ '-n[redirect stdin from /dev/null]' \ '-O+[control an active connection multiplexing master process]:mult= iplex control command:((check\:"check master process is running" exit\:"re= quest the master to exit" forward\:"request forward without command execut= ion" stop\:"request the master to stop accepting further multiplexing requ= ests" cancel\:"cancel existing forwardings with -L and/or -R" proxy))' \ - '-P[use non privileged port]' \ + '-P+[specify a tag name that may be used to select configuration]:t= ag' \ '-p+[specify port on remote host]:port number on remote host' \ '(-v)*-q[quiet operation]' \ '*-R+[specify remote port forwarding]:remote port forwarding:->forw= ard' \ diff --git a/Completion/Unix/Command/_sysctl b/Completion/Unix/Command/_sy= sctl index 0416ca05e..442953c4d 100644 --- a/Completion/Unix/Command/_sysctl +++ b/Completion/Unix/Command/_sysctl @@ -28,6 +28,12 @@ case $OSTYPE in '(- :)'{-V,--version}'[display version info and exit]' \ '*:sysctl variable:_files -W /proc/sys' ;; + freebsd<14->.*) + args+=3D( + '-F[print the format of the variable]' + '(-N)-l[show the length of variables along with their values]' + ) + ;| freebsd<11->.*) args+=3D( '-B[specify buffer size for reading]:buffer size' @@ -53,7 +59,7 @@ case $OSTYPE in '-d[print the description of the variable instead of its value]' \ '(-N -n)-e[separate name and value with =3D]' \ "-i[silently exit if variable doesn't exist]" \ - '(-n)-N[show only variable names]' \ + '(-n -l)-N[show only variable names]' \ '(-N)-n[show only variable values]' \ '(-x)-o[show opaques as well (values suppressed)]' \ '-q[suppress some warnings]' \ diff --git a/Completion/Unix/Type/_diff_options b/Completion/Unix/Type/_di= ff_options index 2646527df..45b777dfe 100644 --- a/Completion/Unix/Type/_diff_options +++ b/Completion/Unix/Type/_diff_options @@ -1,6 +1,6 @@ #autoload = -local of ofwuc ouc oss ofwy ofwg ofwl cmd variant +local of ofwuc ouc oss ofwy ofwg ofwl cmd variant ign local -a args = cmd=3D"$1" @@ -26,6 +26,8 @@ _diff_palette() { } = if _pick_variant -r variant -c $cmd gnu=3DGNU unix -v || [[ $OSTYPE =3D f= reebsd<12->.* ]]; then + (( $#words > 2 )) && ign=3D'!' + # output formats of=3D"-y --side-by-side -n --rcs -e -f --ed -q --brief -c -C --context = -u -U \ --unified --old-group-format --new-group-format --changed-group-format = \ @@ -61,23 +63,19 @@ if _pick_variant -r variant -c $cmd gnu=3DGNU unix -v = || [[ $OSTYPE =3D freebsd<12-> --unchanged-group-format" = if [[ $variant =3D gnu ]]; then - (( $#words > 2 )) || args+=3D( - '(-v --version)'{-v,--version}'[display version information]' - '--help[display usage information]' - ) args+=3D( '(-H --speed-large-files)'{-H,--speed-large-files}'[assume large fi= les and many small changes]' '(-E --ignore-tab-expansion)'{-E,--ignore-tab-expansion}'[ignore ch= anges due to tab expansion]' '(-Z --ignore-trailing-space)'{-Z,--ignore-trailing-space}'[ignore = white space at line end]' - "($ofwuc $oss -F --show-function-line)"{-F+,--show-function-line=3D= }'[show the most recent line matching regex]:regex' "($ofwy $ouc)--left-column[output only left column of common lines]= " "($ofwg $ouc $oss)--old-group-format=3D[set old group format]:old g= roup format" "($ofwg $ouc $oss)--new-group-format=3D[set new group format]:new g= roup format" "($ofwl $ouc $oss)--unchanged-line-format=3D[set unchanged line for= mat]:unchanged line format" - '(--to-file)--from-file=3D[compare specified file to all operands]:= from file:_files' \ - '(--from-file)--to-file=3D[compare all operands to specified file]:= to file:_files' \ + '(--to-file)--from-file=3D[compare specified file to all operands]:= from file:_files' + '(--from-file)--to-file=3D[compare all operands to specified file]:= to file:_files' '--color=3D-[use colors in output]::when [auto]:(never always auto)= ' '--palette=3D[specify colors to use]:color:_diff_palette' + "${ign}(1 2)-v[display version information]" ) else args+=3D( '!--speed-large-files' ) @@ -99,6 +97,7 @@ if _pick_variant -r variant -c $cmd gnu=3DGNU unix -v ||= [[ $OSTYPE =3D freebsd<12-> "($of $oss)-u[output a unified diff]" \ "($ofwuc $oss)*"{-L+,--label=3D}'[set label to use instead of file na= me and timestamp]:label' \ "($ofwuc $oss -p --show-c-function)"{-p,--show-c-function}'[show C fu= nction of each change]' \ + "($ofwuc $oss -F --show-function-line)"{-F+,--show-function-line=3D}'= [show the most recent line matching regex]:regex' \ "($of $ouc $oss)"{-q,--brief}'[output only whether files differ]' \ "($of $ouc $oss -e --ed)"{--ed,-e}'[output an ed script]' \ "!($of $ouc $oss)--normal" \ @@ -127,6 +126,8 @@ if _pick_variant -r variant -c $cmd gnu=3DGNU unix -v = || [[ $OSTYPE =3D freebsd<12-> "($of $ouc)"{-y,--side-by-side}'[output in two columns]' \ "($ofwy $ouc)--suppress-common-lines[don't output common lines]" \ "($ofwy $ouc --width -W)"{--width=3D,-W+}'[set size of line]:number o= f characters per line' \ + "${ign}(1 2)--version[display version information]" \ + "${ign}(1 2)--help[display usage information]" \ "$@" else of=3D'-c -e -f'