Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: completion options update



On Thu, Jun 18, 2026 at 2:33 AM Oliver Kiddle <opk@xxxxxxx> wrote:
>
> This is the usual collection of completion option updates based on
> diffs of --help output. In this case, I used an up-to-date
> rolling-release Linux system as a reference which I haven't done
> in a while.
>
> Relevant versions are:
>
>   bectl, freebsd-update, zfs - FreeBSD 15.1
>   binutils 2.46
>   coreutils 9.11
>   cryptsetip 2.8.6
>   drill 1.9.0
>   entr 5.8
>   ethtool 7.0
>   findutils 4.10
>   flac 1.5
>   gcc just a typo and one option
>   git 2.55.0 (a release candidate)
>   gnutls 3.8.13
>   gpg 2.4.9
>   gphoto2 2.5.32
>   htop 3.5.1
>   kmod 34.2
>   ldd Solaris 11
>   less 704
>   libtiff 4.7.1
>   ngrep 1.47
>   nmap 7.99
>   pandoc 3.7.02
>   patchutils 0.4.5
>   procps-ng 4.0.6 (also now completing for pidwait)
>   psmisc 23.7
>   rar 7.21
>   screen 5.0.1
>   shadow-utils 4.18
>   sqlite 3.53.2
>   ss 7.0
>   strace 7.0
>   texinfo 7.3
>   tracepath 20250605
>   util-linux 2.42.1 (also now completing for hardlink)
>   w3m 0.5.3
>   xmllint 21503
>   xxd 2026-05-31
>   zstd 1.5.7
>   update-rc.d, update-alternatives, invoke-rc.d, dpkg_source, apt - Ubuntu 202410
>     (have checked these against current online Debian man pages).
>
> Oliver
>
> diff --git a/Completion/Debian/Command/_apt b/Completion/Debian/Command/_apt
> index ac3095a4d..2b3303eb6 100644
> --- a/Completion/Debian/Command/_apt
> +++ b/Completion/Debian/Command/_apt
> @@ -492,12 +492,15 @@ _apt-get () {
>      -d,--download-only:bool \
>      -f,--fix-broken:bool \
>      -h,--help:bool \
> +    --assume-no:bool \
> +    -a,--host-architecture:bool \
> +    -P,--build-profiles:bool \
>      -m,--ignore-missing,--fix-missing:bool \
>      -o,--option:arbitem \
>      -q,--quiet,--silent:intlevel \
>      -s,--simulate,--just-print,--dry-run,--recon,--no-act:bool \
>      -t,--target-release,--default-release:release \
> -    -u,--show-upgraded:bool \
> +    --no-show-upgraded:bool \
>      -v,--version:bool \
>      -y,--yes,--assume-yes:bool \
>      --allow-change-held-packages:bool \
> @@ -515,9 +518,13 @@ _apt-get () {
>      --no-download:bool \
>      --no-install-recommends:bool \
>      --no-remove:bool \
> +    --install-suggests:bool \
>      --no-upgrade:bool \
>      --only-source:bool \
>      --only-upgrade:bool \
> +    --allow-downgrades:bool \
> +    --allow-remove-essential:bool \
> +    --allow-change-held-packages:bool \

These three seem to already be listed a few lines above the context.

>      --print-uris:bool \
>      --purge:bool \
>      --reinstall:bool \
> diff --git a/Completion/Debian/Command/_dpkg_source b/Completion/Debian/Command/_dpkg_source
> index eabe8bc33..e2af0a57b 100644
> --- a/Completion/Debian/Command/_dpkg_source
> +++ b/Completion/Debian/Command/_dpkg_source
> @@ -1,16 +1,30 @@
>  #compdef dpkg-source
>
>  _arguments \
> -  '-x[specify source file]:Debian source file:_files -g "*.dsc(-.)"' \
> -  '-b[specify source directory]:Debian source directory:_files -/' \
> +  '(-x --extract)'{-x,--extract}'[specify source file]:Debian source file:_files -g "*.dsc(-.)"::output directory:_directories' \
> +  '(-b --build)'{-b,--build}'[specify source directory]:Debian source directory:_files -/' \
> +  '--print-format[print the format to be used for the source package]: :_directories' \
> +  '--before-build[run the corresponding source package format hook]: :_directories' \
> +  '--after-build[run the corresponding source package format hook]: :_directories' \
> +  '--commit[store upstream changes in a new patch]: :_directories::patch name' \
>    '-c-[control file]:control file:_files' \
>    '-l-[changelog file]:changelog file:_files' \
>    '-F-[changelog format]:changelog format:' \
> +  '--format=[set the format to be used for the source package]:format' \
>    '-V-[set substitutions variable]:expression:' \
>    '-T-[alternate variable file]:varlistfile:' \
>    '-D-[override dsc field]:expression:' \
>    '-U-[remove a field]:field:' \
> -  '-i-[ignore files in diff]:filter:' \
> +  '(-i --diff-ignore)'{-i-,--diff-ignore=}'[filter out files to ignore diffs of]:regex' \
> +  '(-I --tar-ignore)'{-i-,--tar-ignore=}'[filter out files when building tarballs]:regex' \

-i used twice here, should be -I

> +  '(-Z --compression)'{-Z-,--compression=}'[select compression to use]:compression [xz]:(bzip2 gzip lzma xz)' \
> +  '(-z --compression-level)'{-z-,--compression-level=}'[compression level to use]:level [9]' \
> +  "--no-copy[don't copy .orig tarballs]" \
> +  "--no-check[don't check signature and checksums before unpacking]" \
> +  "--no-overwrite-dir[don't overwrite directory on extraction]" \
> +  "--require-valid-signature[abort if the package doesn't have a valid signature]" \
> +  '--require-strong-checksums[abort if the package contains no strong checksums]' \
> +  '--ignore-bad-version[allow bad source package versions]' \
>    '-sa[autoselect orig source]' \
>    '-sk[use packaged orig source - unpack and keep]' \
>    '-sp[use packaged orig source - unpack and remove]' \
> @@ -25,4 +39,7 @@ _arguments \
>    '-sR[use unpackaged orig source - unpack and remove with overwrite]' \
>    '-sp[leave original source packed in cwd]' \
>    '-su[unpack original source tree too]' \
> -  '-h[help]'
> +  "--skip-debianization[don't apply debian diff to upstream sources]" \
> +  '(-)'{-\?,--help}'[display help information]' \
> +  '-q[quiet mode]' \
> +  '--version[display version information]'
> diff --git a/Completion/Linux/Command/_ethtool b/Completion/Linux/Command/_ethtool
> index 8cff24e96..2213a5d06 100644
> --- a/Completion/Linux/Command/_ethtool
> +++ b/Completion/Linux/Command/_ethtool
> @@ -6,14 +6,24 @@ local -A opt_args
>
>  _arguments -C -A "-*" \
>    '--debug[turn on debugging messages]:mask:((1\:parser\ information))' \
> -  '--json[output results in JSON]' \
> +  '(-j --json)'{-j,--json}'[output results in JSON]' \
>    '(-I --include-statistics)'{-I,--include-statistics}'[include command-related statistics in the output]' \
> -  '(cmds)'{-Q,--per-queue}'[apply per-queue command]: :(queue_mask):queue mask' \
> +  '(cmds cmdp)'{-Q,--per-queue}'[apply per-queue command]: :(queue_mask):queue mask' \
> +  '(cmds cmdc)--phy=[target a PHY within the interface.]:phy' \

trailing . in description

>    "1:interface:_net_interfaces" \
>    '*:: :->args' \
>    + '(cmdc)' \
> -  '(cmds)'{-c,--show-coalesce}'[query the specified ethernet device for coalescing information]' \
> -  '(cmds)'{-C,--coalesce}'[change the coalescing settings of the specified ethernet device]' \
> +  '(cmdp cmds)'{-c,--show-coalesce}'[query the specified ethernet device for coalescing information]' \
> +  '(cmdp cmds)'{-C,--coalesce}'[change the coalescing settings of the specified ethernet device]' \
> +  + '(cmdp)' \
> +  '(cmds cmdc)--cable-test[perform cable test and report the results]' \
> +  '(cmds cmdc)--cable-test-tdr[perform cable test and report Time Domain Reflectometer data]' \
> +  '(cmds cmdc)--get-plca-cfg[get PLCA configuration]' \
> +  '(cmds cmdc)--set-plca-cfg[set PLCA configuration]' \
> +  '(cmds cmdc)--get-plca-status[get PLCA status information]' \
> +  '(cmds cmdc)--show-pse[show settings for power sourcing equipment]' \
> +  '(cmds cmdc)--set-pse[set power sourcing equipment settings]' \
> +  '(cmds cmdc)--show-mse[show Mean Square Error (MSE) diagnostics]' \
>    + '(cmds)' \
>    '(1)'{-h,--help}'[display help information]' \
>    '(1)--version[display version information]' \
> diff --git a/Completion/Unix/Command/_cat b/Completion/Unix/Command/_cat
> index 78c35653c..f71d77e2e 100644
> --- a/Completion/Unix/Command/_cat
> +++ b/Completion/Unix/Command/_cat
> @@ -1,65 +1,74 @@
>  #compdef cat gcat
>
> +local ign
>  local -a args
>
>  if _pick_variant gnu='(GNU|uutils)' unix --version; then
> +  (( $#words > 2 )) && ign='!(- : *)'
>    args=(
>      '(-A --show-all)'{-A,--show-all}'[equivalent to -vET]'
>      '(-b --number-nonblank -n --number)'{-b,--number-nonblank}'[number nonempty output lines, overrides -n]'
>      '-e[equivalent to -vE]'
> -    '(-E --show-ends)'{-E,--show-ends}'[display $ at end of each line]'
> +    '(-E --show-ends)'{-E,--show-ends}'[display $ or ^M$ at end of each line]'
>      '(-n --number)'{-n,--number}'[number all output lines]'
>      '(-s --squeeze-blank)'{-s,--squeeze-blank}'[suppress repeated empty output lines]'
>      '-t[equivalent to -vT]'
>      '(-T --show-tabs)'{-T,--show-tabs}'[display TAB characters as ^I]'
>      '-u[ignored]'
>      '(-v --show-nonprinting)'{-v,--show-nonprinting}'[use ^ and M- notation, except for LFD and TAB]'
> -    '(- : *)--help[display help and exit]'
> -    '(- : *)--version[output version information and exit]'
> -    '*: :_files'
> -  )
> -
> -elif [[ "$OSTYPE" == (*bsd|dragonfly|darwin)* ]]; then
> -  args=(
> -    -A "-*"
> -    '(-n)-b[number non-blank output lines]'
> -    '(-v)-e[display $ at the end of each line (implies -v)]'
> -    '-n[number all output lines]'
> -    '-s[squeeze multiple blank lines into one]'
> -    '(-v)-t[display tab as ^I (implies -v)]'
> -    '-u[do not buffer output]'
> -    '-v[display non-printing chars as ^X or M-a]'
> -    '*: :_files'
> -  )
> -  [[ $OSTYPE = (free|net)bsd* ]] && args+=(
> -    '-l[set a lock on the stdout file descriptor]'
> -  )
> -  [[ $OSTYPE = netbsd* ]] && args+=(
> -    '-B+[read with buffer of specified size]:size (bytes)'
> -    '-f[only attempt to display regular files]'
> -  )
> -  [[ $OSTYPE = darwin* ]] && args+=(
> -    '-l[set an exclusive advisory lock on standard output]'
> -  )
> -elif [[ $OSTYPE = solaris* ]]; then
> -  args=(
> -    -A "-*"
> -    '(-b)-n[number all output lines]'
> -    '(-n)-b[number non-blank output lines]'
> -    "-u[don't buffer output]"
> -    '-s[be silent about non-existent files]'
> -    '-v[display non-printing chars as ^X or M-a]'
> -    '-e[display $ at the end of each line (requires -v)]'
> -    '-t[display tab as ^I and formfeeds and ^L (requires -v)]'
> +    "$ign--help[display help and exit]"
> +    "$ign--version[display version information]"
>      '*: :_files'
>    )
>  else
> -  # POSIX requires '-u', and most OSes may support '-n'
> -  args=(
> +  # POSIX requires just '-u'
> +  args=( -A "-?*"
> +    '(-n)-b[number non-blank output lines]'
> +    '(-v)-e[display $ at the end of each line (implies -v)]'
> +    '-v[display non-printing chars as ^X or M-a]'
>      '-n[number all output lines]'
> -    '-u[do not buffer output]'
> +    "-u[don't buffer output]"
>      '*: :_files'
>    )
> +  case $OSTYPE in
> +    (*bsd|dragonfly|darwin)*)
> +      args+=(
> +        '-s[squeeze multiple blank lines into one]'
> +        '(-v)-t[display tab as ^I (implies -v)]'
> +        '-v[display non-printing chars as ^X or M-a]'

-v already added above

> diff --git a/Completion/Unix/Command/_column b/Completion/Unix/Command/_column
> index 737bb4561..aa3a3664a 100644
> --- a/Completion/Unix/Command/_column
> +++ b/Completion/Unix/Command/_column
> @@ -34,8 +34,9 @@ case $variant in
>        + table
>        '(info fill -t --table)'{-t,--table}'[create a table]'
>        '(info fill -o --output-separator)'{-o+,--output-separator=}'[specify column separator for table output]:separator [two spaces]'
> -      '(info fill -s --separator)'{-s+,--separator=}'[specify column delimiters in input data]:delimiters'
> +      '(info fill -s --input-separator --separator)'{-s+,--input-separator=,--separator=}'[specify column delimiters in input data]:delimiters'
>        '(info fill -O --table-order)'{-O+,--table-order=}'[specify order of output columns]: :->columns'
> +      '(info)--table-colorscheme=[specify color scheme name]:name [column]'
>        '(info fill -N --table-columns)*'{-C+,--table-column=}'[specify column properties]: :_values -s, -S= property
>          "name[column name]\:name"
>          "trunc[truncate text in the columns when necessary]"
> @@ -54,13 +55,16 @@ case $variant in
>        '(info fill json -d --table-noheadings)'{-d,--table-noheadings}"[don't print header]"
>        '(info fill json -E --table-noextreme)'{-E+,--table-noextreme}"[specify columns where length can be ignored]: :->columns"
>        '(info fill json -e --table-header-repeat)'{-e,--table-header-repeat}'[repeat header for each page]'
> +      '(info fill json -K --table-header-as-columns)'{-K,--table-header-as-columns}'[use first row as table header]'
>        '(info fill json -H --table-hide)'{-H+,--table-hide=}"[don't print specified columns]: :->columns"
>        '(info fill json -R --table-right)'{-R+,--table-right=}'[right align text in these columns]: :->columns'
>        '(info fill json -T --table-truncate)'{-T+,--table-truncate=}'[truncate text in the columns when necessary]: :->columns'
>        '(info fill json -W --table-wrap)'{-W+,--table-wrap=}'[wrap text in the columns when necessary]: :->columns'
> +      '(info fill json)--wrap-separator=[wrap at specified separator]:string'
>        '(info fill json -r --tree)'{-r+,--tree=}'[specify column to format tree-like]: :->columns'
>        '(info fill json -i --tree-id)'{-i+,--tree-id=}'[specify column containing ID for child-parent relations]: :->columns'
>        '(info fill json -p --tree-parent)'{-p+,--tree-parent=}'[specify column containing reference to parent]: :->columns'
> +      '(info table json -S --use-spaces)'{-S+,--use-spaces=}'[minimal whitespace between columns (no tabs)]:spaces'

should this table be fill, or should this option be added in the fill section?

>        + json
>        '(info fill text -n --table-name -c --output-width)'{-n+,--table-name=}'[specify table name for JSON output]:name'
>        '(info fill text -J --json -c --output-width)'{-J,--json}'[use JSON output format for table]'
> diff --git a/Completion/Unix/Command/_nmap b/Completion/Unix/Command/_nmap
> index 2a507baa3..148b77b51 100644
> --- a/Completion/Unix/Command/_nmap
> +++ b/Completion/Unix/Command/_nmap
> @@ -1,63 +1,127 @@
>  #compdef nmap
>
> -local curcontext="$curcontext" state line suf ret=1
> +local curcontext="$curcontext" ign dir ret=1
> +local -a state line expl suf
> +local -A opt_args
> +local -aU scripts categories
>
> -_arguments -C \
> +(( $#words == 2 )) || ign='!(- *)'
> +_arguments -s -S -C \
> +  '!(-6)-4' \
>    '!-sI:zombie host:_hosts' \
> -  '!-P'{T,S,U}'+:port list' \
> -  '*-s-[specify scan type]:scan type:((S\:TCP\ SYN\ scan T\:TCP\ connect\(\)\ scan F\:stealth\ FIN\ scan X\:stealth\ Xmas\ tree\ scan N\:stealth\ null\ scan P\:ping\ scanning U\:UDP\ scan O\:IP\ protocol\ scan I\:idle\ scan A\:ACK\ scan W\:window\ scan R\:RPC\ scan L\:list\ scan V\:version\ detection))' \
> -  '-b[specify ftp relay host]:ftp relay host:_hosts' \
> -  '*-P-[specify probe types and options]:probe type/options:->probe-opts' \
> -  '-A[enable OS detection and version scanning]' \
> -  '-O[enable remote OS identification]' \
> -  '-6[enable IPv6 support]' \
> -  '-I[enable TCP reverse ident scanning]' \
> -  '-f[use tiny fragmented IP  packets]' \
> -  '*-v[verbose mode]' \
> -  '-h[show help information]' \
> -  '*-o-[log results]:log format:->log-forms:log filename:_files' \
> -  '--resume[resume cancelled scan]:log filename:_files' \
> -  '--append-output[append results to any log files]' \
> +  '!-P'{S,A,U,Y}'+:port list' \
> +  '!-PO+:protocol list' \
> +  '!(-F -p --exclude-ports)-sn' \
>    '-iL[read target specifications from file]:file:_files' \
>    '-iR[scan random hosts]:num hosts' \
> -  '-p[specify ports to try]:port numbers' \
> -  '-F[scan only ports listed in services file]' \
> -  '-D[perform decoy scan]:host list:_sequence -s, _hosts' \
> -  '-S[specify source address]:address:_hosts' \
> -  '-e[specify interface to use]:network interface:_net_interfaces' \
> -  '-g[specify source port number]:port number' \
> -  '--data-length[add random data to packets]:data length' \
> -  '(-R)-n[skip reverse DNS to speed things up]' \
> +  '--exclude[specify hosts/networks to exclude]:host list:_sequence -s, _hosts' \
> +  '--excludefile[use exclude list from a file]:file:_files' \
> +  '*-s-[specify scan type]:scan type:((S\:TCP\ SYN\ scan T\:TCP\ connect\(\)\ scan F\:stealth\ FIN\ scan X\:stealth\ Xmas\ tree\ scan N\:stealth\ null\ scan P\:ping\ scanning U\:UDP\ scan O\:IP\ protocol\ scan I\:idle\ scan A\:TCP\ ACK\ scan W\:TCP\ window\ scan M\:TCP\ Maimon\ scan R\:RPC\ scan L\:list\ scan Y\:SCTP\ INIT\ scan Z\:SCTP\ COOKIE-ECHO\ scan V\:version\ detection n\:no\ port\ scan C\:equivalent\ to\ --script=default))' \
> +  '*-P-[specify probe types and options]:probe type/options:->probe-opts' \
> +  '(-R --dns-servers --system-dns)-n[skip reverse DNS to speed things up]' \
>    '(-n)-R[always do reverse DNS on targets]' \
> +  '--resolve-all[scan all addresses resolved via DNS]' \
> +  '--unique[scan each address only once]' \
> +  '(--dns-servers -n)--system-dns[use OS DNS resolver for reverse lookups]' \
> +  '(--system-dns -n)--dns-servers[specify custom DNS servers for reverse lookups]:server:_sequence s, _hosts' \

missing - in _sequence -s

> +  "--disable-arp-ping[don't do ARP or IPv6 ND of locally connected ethernet hosts]" \
> +  "--discovery-ignore-rst[don't treat RST replies as proof of a target being up]" \
> +  '--traceroute[trace hop path to each host]' \
> +  '--scanflags[customize TCP scan flags]:TCP flags:->tcp-flags' \
> +  '-b[specify ftp relay host]:ftp relay host:_hosts' \
> +  '-p+[specify ports to try]:port numbers' \
> +  '--exclude-ports[exclude specified ports]:port numbers' \
> +  '-F[scan only ports listed in services file]' \
>    "-r[don't randomize order in which ports are scanned]" \
> -  '-ttl[specify IPv4 time to live for sent packets]' \
> -  '--randomize-hosts[scan hosts in random order]' \
> -  '-M[specify maximum number of parallel TCP connects]:maximum TCP connects' \
> -  '--packet-trace[show all packets sent in tcpdump-like format]' \
> +  '--top-ports[scan most common ports]:number of ports' \
> +  '--port-ratio[scan ports more common than specified ratio]: :_numbers -l 0.0 -m 1.0 ratio' \
> +  "--allports[don't exclude any ports from version detection]" \
> +  '(--version-light --version-all)--version-intensity[limit version probes to try]:level:((0\:light 1 2 3 4 5 6 7 8 9\:try\ all))' \
> +  '(--version-intensity --version-all)--version-light[alias for --version-intensity 2]' \
> +  '(--version-intensity --version-light)--version-all[alias for --version-intensity 9]' \
>    '--version-trace[show packets related to version scanning]' \
> -  '--datadir[specify directory containing data files]:directory:_directories' \
> -  '-T[specify timing policy]:timing policy:(Paranoid Sneaky Polite Normal Aggressive Insane)' \
> -  '--host-timeout[specify maximum time for scanning a single host]:timeout (ms)' \
> -  '--max-rtt-timeout[maximum time for a probe response]:timeout (ms)' \
> -  '--min-rtt-timeout[minimum time to wait for a probe response]:time (ms)' \
> -  '--initial-rtt-timeout[specify initial probe timeout]:timeout (ms)' \
> -  '--max-parallelism[specify max number of scans to perform in parallel]:number' \
> -  '--min-parallelism[scan at least specified number of ports in parallel]:number' \
> -  '--scan-delay[specify minimum amount of time between probes]:delay (ms)' \
> -  '--interactive[go into interactive mode]' \
> +  '-O[enable remote OS identification]' \
> +  '--osscan-limit[limit OS detection to promising targets]' \
> +  '(--osscan-guess --fuzzy)'{--osscan-guess,--fuzzy}'[guess OS more aggressively]' \
> +  '--max-os-tries[set maximum number of OS detection tries against a target]:tries [5]' \
> +  '--script=[specify Lua scripts]:script:->scripts' \
> +  '--script-args[provide arguments to scripts]:arguments' \
> +  '--script-args-file[provide script arguments in a file]:file:_files' \
> +  '--script-trace[show all data sent and received]' \
> +  '--script-updatedb[update the script database]' \
> +  "$ign--script-help=[show help about scripts]:script:->scripts" \
> +  --{min,max}-hostgroup'[set parallel scan group size]:size' \
> +  --{min,max}-parallelism'[specify number of scans to perform in parallel]:number' \
> +  --{min,max}-rtt-timeout'[set time to wait for a probe response]: :_numbers -u seconds time \:s ms m h' \
> +  '--initial-rtt-timeout[specify initial probe timeout]: :_numbers -u seconds timeout \:s ms m h' \
> +  '--max-retries[cap number of port scan probe retransmissions]:tries' \
> +  '--host-timeout[specify maximum time for scanning a single host]: :_numbers -u seconds timeout \:s ms m h' \
> +  '--script-timeout[set a ceiling on script execution time]:max time' \
> +  '(--scan-delay --max-scan-delay)'--{max-,}'scan-delay[set amount of time between probes to a given host]: :_numbers -u seconds delay \:s ms m h' \
> +  '--min-rate[send packets no slower than number per second]:packets' \
> +  '--max-rate[send packets no faster than number per second]:packets' \
> +  '--defeat-'{rst,icmp}'-ratelimit' \
> +  '--nsock-engine:IO multiplexing engine:(iocp epoll kqueue poll select)' \
> +  '-T[set a timing template]:timing policy:(paranoid sneaky polite normal aggressive insane)' \
> +  '-f[fragment packets]' \
> +  '--mtu=[specify MTU, with -f]:mtu' \
> +  '-D[perform decoy scan]:host list:_sequence -s, _hosts' \
> +  '-S[spoof source address]:address:_hosts' \
> +  '-e[specify interface to use]:network interface:_net_interfaces' \
> +  '(-g --source-port)'{-g,--source-port=}'[specify source port number]:port number' \
> +  '--data=[append a custom payload to sent packets]:payload (hex string)' \
> +  '--data-string=[append a custom ASCII string to sent packets]:string' \
> +  '--data-length[add random data to packets]:data length' \
> +  '--ip-options=[send packets with specified IP options]:IP options:->ip-options' \
> +  '--ttl[specify IPv4 time to live for sent packets]:time-to-live' \
> +  '--randomize-hosts[scan hosts in random order]' \
> +  '--spoof-mac=[spoof your MAC address]:MAC address' \
> +  '--proxies=[relay connections through HTTP/SOCKS4 proxies]:proxy;_sequence _urls' \

semicolon instead of colon

> +  '--badsum[send packets with a bogus TCP/UDP/SCTP checksum]' \
> +  '--adler32[use deprecated Adler32 instead of CRC32C for SCTP checksums]' \
> +  '*-o-[log results]:log format:->log-forms: :{_files || _date_formats}' \
> +  '*-v-[increase verbosity]::level' \
> +  '*-d-[increase debugging level]::level' \
> +  '--reason[show why a port is in a particular state]' \
> +  '--stats-every=[print periodic timing stats]: :_numbers -u seconds interval \:s ms m h' \
> +  '--open[only show open (or possibly open) ports]' \
> +  '--packet-trace[show all packets sent in tcpdump-like format]' \
> +  "$ign--iflist[list interfaces and routes]" \
> +  '--append-output[append results to any log files]' \
> +  "$ign--resume[resume aborted scan]:log filename:_files" \
> +  '--noninteractive[disable runtime interactions via keyboard]' \
> +  '(--webxml)--stylesheet[specify XSL stylesheet to transform XML output to HTML]:stylesheet:_urls' \
> +  '(--stylesheet)--webxml[load stylesheet from Nmap.Org]' \
> +  '--no-stylesheet[omit XSL stylesheet declaration from XML]' \
> +  '-6[enable IPv6 scanning]' \
> +  '(-O)-A[enable OS detection, version detection, script scanning and traceroute]' \
> +  '--datadir=[specify custom Nmap data file location]:directory:_directories' \
> +  '--servicedb=[specify custom services file]:services file:_files' \
> +  '--versiondb=[specify custom service probes file]:service probes file:_files' \
> +  '(--send-ip)--send-eth[send using raw ethernet frames]' \
> +  '(--send-eth)--send-ip[send using raw IP packets]' \
> +  '(--unprivileged)--privileged[assume user is fully privileged]' \
> +  '(--privileged)--unprivileged[assume user lacks raw socket privileges]' \
> +  '!--release-memory' \
> +  "$ign"{-V,--version}'[print version number]' \
> +  "$ign"{-h,--help}'[print help summary]' \
>    '*:host:_hosts' && ret=0
>
>  case $state in
>    probe-opts)
> -    _values -S '' 'probe type/option' \
> -      "0[don't try to ping hosts before scanning]" \
> -      'T[use TCP "ping"]' \
> -      'S[use SYN packets instead of ACK]' \
> -      'U[send UDP probes]' \
> -      'E[use a true ping]' \
> -      'P[use an ICMP timestamp request]' \
> -      'M[use a netmask request]' \
> -      'B[use ACK and ICMP echo in parallel]' && ret=0
> +    _values -S '' 'discovery probe type [R]' \
> +      'n[skip host discovery]' \
> +      'A[use TCP with ACK flag]' \
> +      'S[use TCP with SYN flag]' \
> +      'U[use UDP discovery probe]' \
> +      'Y[use SCTP discovery probe]' \
> +      'E[use ICMP echo request ]' \
> +      'P[use ICMP timestamp request]' \
> +      'M[use ICMP netmask request]' \
> +      'O[IP protocol ping]' \
> +      'R[use ARP]' \
> +      'O[use IP protocol ping (requires root)]' \

Should one of these O be a different letter?

> +      && ret=0
>    ;;
>    log-forms)
>      _values 'log format' \
> @@ -65,13 +129,50 @@ case $state in
>        'X[XML]' \
>        'G[grepable]' \
>        'A[all]' \
> -      'S[S|<ipT kiDdI3]' && ret=0
> +      'S[S|<rIpt kIddi3]' && ret=0
>    ;;
> -  host-list)
> -    suf=()
> -    compset -P '*,'
> +  tcp-flags)
> +    compset -P '(URG|ACK|PSH|RST|SYN|FIN)#'
> +    _wanted tcp-flags expl 'TCP flag' compadd -S '' \
> +        URG ACK PSH RST SYN FIN && ret=0
> +  ;;
> +  ip-options)
> +    _values -S ' ' "IP option" \
> +      'R[record route (9 slots availble)]' \

availble

> +      'T[record internet timestamps (9 slots)]' \
> +      'U[record timestamps and ip addresses (4 slots)]' \
> +      'L[loose source routing (8 slots)]:hop ip' \
> +      'S[strict source routing (8 slots)]:hop ip' && ret=0
> +  ;;
> +  scripts)
> +    compset -P '*,(|+)'
>      compset -S ',*' || suf=(-qS ,)
> -    _hosts "$suf[@]" && ret=0
> +
> +    if [[ $PREFIX$SUFFIX = */* ]]; then
> +      _files -g "*.nse(-.)"
> +      return
> +    fi
> +
> +    categories=( all )
> +    for dir in \
> +      ${opt_args[--datadir]:+${~opt_args[--datadir]}/scripts(/N)} \
> +      $NMAPDIR/scripts(/N) \
> +      ${${commands[$words[1]]:-$words[1]}:P:h:h}/share/nmap/scripts(/N) \
> +      ~/.nmap/scripts(/N) \
> +      ../share/nmap/scripts(/N) \
> +      $NMAPDATADIR/scripts(/N) \
> +      .
> +    do
> +      if [[ -r $dir/script.db ]]; then
> +        scripts+=( ${${${(SM)${(f)"$(<$dir/script.db)"}#filename = \"[^.]##.}%.}#*\"} )
> +        categories+=( ${${(s.,.)${(SM)${(f)"$(<$dir/script.db)"}##categories = [^\}]#}#*\{}//[ \"]/} )
> +      else
> +        scripts+=( $dir/*.nse(N:t:r) )
> +      fi
> +    done
> +    _alternative \
> +      'categories:category:compadd $suf -a categories' \
> +      'scripts:script:compadd -M "r:|-=* r:|=*" $suf -a scripts' && ret=0
>    ;;
>  esac
>
> diff --git a/Completion/Unix/Command/_zfs b/Completion/Unix/Command/_zfs
> index 3e2882536..47e60ec66 100644
> --- a/Completion/Unix/Command/_zfs
> +++ b/Completion/Unix/Command/_zfs
> @@ -477,9 +477,11 @@ case $service:$words[1] in
>    ;;
>
>    zfs:clone)
> -    [[ $implementation = solaris ]] && args+=(
> -    '-K[create encryption key]'
> -  )
> +    if [[ $implementation = solaris ]]; then
> +      args+=( '-K[create encryption key]' )
> +    else
> +      args+=( "-u[don't mount newly created dataset]" )
> +    fi
>    _arguments -C -A "-*" -S $args \
>      '-p[create parent datasets]' \
>      '*-o+[set property]:property:->create-properties' \
> diff --git a/Completion/Unix/Command/_zstd b/Completion/Unix/Command/_zstd
> index 92c4a8e41..c1b5c65a7 100644
> --- a/Completion/Unix/Command/_zstd
> +++ b/Completion/Unix/Command/_zstd
> @@ -52,6 +52,7 @@ elif (( $words[(I)(-d|--decompress|--uncompress|-l|--list|-t|--test)] )); then
>      '(--sparse)-o[specify output file]:file:_files -g "^*.(|t)zst(-.)"'
>      "(M)--no-check[ignore checksums in compressed frame]"
>      '!(M --no-check)'{-C,--check}
> +    '--pass-through[pass through uncompressed files as-is]'
>      '*:files:_files -g "*.(|t)zst(-.)"'
>    )
>  else
> @@ -108,6 +109,7 @@ _arguments -s -S : $args \
>    '--filelist=[read list of files to operate upon from file]: :_files' \
>    '--output-dir-flat=[store processed files in directory]: :_directories' \
>    '--output-dir-mirror=[store processed files in directory respecting original structure]: :_directories' \
> +  '--no-asyncio[display asynchronous IO]' \

disable

>    '--trace=[log tracing information to file]: :_files' \
>    + '(M)' \
>    \!{-z,--compress,--uncompress} \
>


--
Mikael Magnusson




Messages sorted by: Reverse Date, Date, Thread, Author