From 6386dd94fd0fe771e9c79864ad2a24e4f2ff123e Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Thu, 16 Mar 2023 22:15:28 +0100 Subject: 51582: openssh 9.3 completion update --- Completion/Unix/Command/_ssh | 184 +++++++++++++++++++++++++++---------------- 1 file changed, 118 insertions(+), 66 deletions(-) (limited to 'Completion/Unix/Command/_ssh') diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh index 2385272f1..e9ca454b4 100644 --- a/Completion/Unix/Command/_ssh +++ b/Completion/Unix/Command/_ssh @@ -18,14 +18,18 @@ _ssh () { '*-o+[specify extra options]:option string:->option' ) common_transfer=( + '(-O)-D+[connect directly to a local sftp server]:sftp server path:_command_names -e' '-J+[connect via a jump host]: :->userhost' '-l+[limit used bandwidth]:bandwidth (Kbit/s)' '-P+[specify port on remote host]:port number on remote host' '-p[preserve modification times, access times and modes]' '-q[disable progress meter and warnings]' '-r[recursively copy directories (follows symbolic links)]' - '-S+[specify ssh program]:path to ssh:_command_names -e' \ + '-S+[specify ssh program]:path to ssh:_command_names -e' '-v[verbose mode]' + '*(-O)-X+[specify sftp protocol option]: : _values "sftp option" + "nrequests[set max concurrent SFTP read or write requests]\:requests [64]" + "buffer[set max buffer size for a single SFTP read/write operation]\: \:_numbers -l 0 -m 256K -d 32K -u bytes -f size \:B\:bytes \:K\:kilobytes"' ) algopt='-E+[specify hash algorithm for fingerprints]:algorithm:(md5 sha256)' @@ -58,7 +62,7 @@ _ssh () { '(-v)*-q[quiet operation]' \ '*-R+[specify remote port forwarding]:remote port forwarding:->forward' \ '-S+[specify location of control socket for connection sharing]:path to control socket:_files' \ - '-Q+[query parameters]:query option:((cipher\:"supported symmetric ciphers" cipher-auth\:"supported symmetric ciphers that support authenticated encryption" mac\:"supported message integrity codes" kex\:"key exchange algorithms" key\:"key types" key-cert\:"certificate key types" key-plain\:"non-certificate key types" protocol-version\:"supported SSH protocol versions" sig\:"supported signature algorithms" help\:"show supported queries"))' \ + '-Q+[query parameters]:query option:((cipher\:"supported symmetric ciphers" cipher-auth\:"supported symmetric ciphers that support authenticated encryption" compression mac\:"supported message integrity codes" kex\:"key exchange algorithms" kex-gss\:"GSSAPI key exchange algorithms" key\:"key types" key-cert\:"certificate key types" key-plain\:"non-certificate key types" key-sig\:"all key types and signature algorithms" protocol-version\:"supported SSH protocol versions" sig\:"supported signature algorithms" help\:"show supported queries" HostbasedAcceptedAlgorithms HostKeyAlgorithms KexAlgorithms MACs PubkeyAcceptedAlgorithms))' \ '-s[invoke subsystem]' \ '(-t)-T[disable pseudo-tty allocation]' \ "(-T)*-t[force pseudo-tty allocation${tdesc}]" \ @@ -76,7 +80,8 @@ _ssh () { scp) _arguments -C -s \ '-3[copy through local host, not directly between the remote hosts]' \ - '-B[batch mode (don'\''t ask for passphrases)]' \ + "-B[batch mode (don't ask for passwords or passphrases)]" \ + '(-D -X)-O[use the original SCP protocol instead of the SFTP protocol]' \ '-T[disable strict filename checking]' \ '*:file:->file' "$common[@]" "$common_transfer[@]" && ret=0 ;; @@ -95,12 +100,14 @@ _ssh () { '--apple-load-keychain[add identities from keychain]' '--apple-use-keychain[update keychain when adding/removing identities]' ) - _arguments -s : $args \ + _arguments -C -s : $args \ '-c[identity is subject to confirmation via SSH_ASKPASS]' \ '-D[delete all identities]' \ '-d[remove identity]' \ $algopt \ '-e+[remove keys provided by the PKCS#11 shared library]:library:_files -g "*.(so|dylib)(|.<->)(-.)"' \ + '*-H[specify a known hosts file to look up hostkeys]:known hosts file:_files' \ + '*-h[constrain keys to specific hosts or destinations]:destination:->destinations' \ '-k[load plain private keys only and skip certificates]' \ '-K[load resident keys from a FIDO authenticator]' \ '-L[list public key parameters of all identities in the agent]'\ @@ -109,14 +116,13 @@ _ssh () { '-M+[specify maximum number of signatures]:number' \ '-S+[use specified library when adding FIDO authenticator-hosted keys]:library:_files' \ '-s+[add keys provided by the PKCS#11 shared library]:library:_files -g "*.(so|dylib)(|.<->)(-.)"' \ - '-t+[set maximum lifetime for identity]:maximum lifetime (in seconds or time format):' \ + '-t+[set maximum lifetime for identity]: :_numbers -u seconds "maximum lifetime" \:s\:seconds m\:minutes h\:hours d\:days w\:weeks' \ "-T[test usability of identity files' private keys]:*:public key file:_files -g '*.pub(-.)'" \ '*-v[verbose mode]' \ '-q[be quiet after a successful operation]' \ '-X[unlock the agent]' \ '-x[lock the agent with a password]' \ - '*:SSH identity file:_files' - return + '*:SSH identity file:_files' && ret=0 ;; ssh-agent) _arguments -s \ @@ -128,7 +134,7 @@ _ssh () { '-k[kill current agent]' \ '(-k)-P[specify PKCS#11 shared library whitelist]:PKCS#11 library whitelist pattern' \ '(-k -c)-s[force sh-style shell]' \ - '-t[set default maximum lifetime for identities]:maximum lifetime (in seconds or time format):' \ + '-t+[set default maximum lifetime for identities]: :_numbers -u seconds "maximum lifetime" \:s\:seconds m\:minutes h\:hours d\:days w\:weeks' \ '-v[verbose mode]' \ '*::command: _normal' return @@ -183,15 +189,13 @@ _ssh () { case ${words[arg]#-Y} in ^find-*) sigargs+=( "$p1-n+[specify namespace]:namespace" ) ;| check*|find*|verify) - sigargs+=( "$p1-s+[specify signature file]:signature file:-files" ) + sigargs+=( "$p1-s+[specify signature file]:signature file:_files" ) ;| + match*|verify) sigargs+=( '-I+[specify signer identity]:identity' ) ;| sign) sigargs+=( '*:file:_files' ) ;; verify) args=() - sigargs+=( - '-I+[specify signer identity]:identity' - '-r+[specify revocation file]:revocation file:_files' - ) + sigargs+=( '-r+[specify revocation file]:revocation file:_files' ) ;; esac fi @@ -235,12 +239,6 @@ _ssh () { "($cmn)-L[print the contents of a certificate]" \ "(${${(@)cmn:#-a}})-A[generate host keys for all key types]" \ "($cmn)-Q[test whether keys have been revoked in a KRL]" \ - "($cmn)-Y+[signature action]:action:(( - find-principals\:find\ the\ principal\ associated\ with\ the\ public\ key\ of\ a\ signature - sign\:sign\ a\ file\ using\ SSH\ key - verify\:verify\ a\ signature\ generated\ using\ the\ sign\ option - check-novalidate\:check\ signature\ structure - ))" \ - finger \ "$p1($cmn)$algopt" \ - create \ @@ -260,6 +258,13 @@ _ssh () { "($cmn -I -h -n -D -O -U -V)-k[generate a KRL file]" \ "$p1($cmn -I -h -n -D -O -U -V)-u[update a KRL]" \ - signature \ + "(${${(@)cmn:#-O}})-Y+[signature action]:action:(( + find-principals\:find\ the\ principal\ associated\ with\ the\ public\ key\ of\ a\ signature + sign\:sign\ a\ file\ using\ SSH\ key + verify\:verify\ a\ signature\ generated\ using\ the\ sign\ option + check-novalidate\:check\ signature\ structure + match-principals\:find\ matching\ principal + ))" \ $sigargs return ;; @@ -271,8 +276,10 @@ _ssh () { '-D[print keys found as SSHFP DNS records]' \ '*-f+[read hosts from file, one per line]:file:_files' \ '-H[hash all hostnames and addresses in the output]' \ + '-O+[specify a key/value option]: : _values option + "hashalg[select a hash algorithm to use with -D]\:algorithm [both]\:(sha1 sha256)"' \ '-p+[specify port on remote host]:port number on remote host' \ - '-T+[specify timeout]:timeout (seconds) [5]' \ + '-T+[specify timeout]: :_numbers -u seconds -d 5 timeout \:s\:seconds m\:minutes h\:hours d\:days w\:weeks' \ '-t+[specify key types to fetch from scanned hosts]:key type:_sequence compadd - rsa dsa ecdsa ed25519' \ '-v[verbose mode]' return @@ -282,7 +289,6 @@ _ssh () { '-a[attempt to continue interrupted transfers]' \ '-B+[specify buffer size]:buffer size (bytes) [32768]' \ '-b+[specify batch file to read]:batch file:_files' \ - '-D+[connect directly to a local sftp server]:sftp server path' \ '-f[request that files be flushed immediately after transfer]' \ '-N[disable implicit quiet mode set by -b]' \ '-R+[specify number of outstanding requests]:number of requests [64]' \ @@ -309,22 +315,37 @@ _ssh () { option) if compset -P 1 '*='; then case "${IPREFIX#-o}" in - (#i)(ciphers|macs|kexalgorithms|hostkeyalgorithms|pubkeyacceptedkeytypes|hostbasedkeytypes)=) - if ! compset -P '[+-]'; then - _wanted prefix expl 'relative to default' compadd - + - && ret=0 + (#i)(ciphers|macs|kexalgorithms|hostkeyalgorithms|pubkeyacceptedalgorithms)=) + local sep + zstyle -s ":completion:${curcontext}:" list-separator sep || sep=-- + if ! compset -P '[+-^]'; then + _wanted prefix expl 'relative to default' compadd -S '' -d \ + "( + +\ $sep\ append\ to\ default\ list + -\ $sep\ remove\ from\ default\ list + ^\ $sep\ insert\ at\ head\ of\ default\ list + )" - + - \^ && ret=0 fi ;; esac case "${IPREFIX#-o}" in - (#i)(afstokenpassing|batchmode|canonicalizefallbacklocal|challengeresponseauthentication|checkhostip|clearallforwardings|compression|enablesshkeysign|exitonforwardfailure|fallbacktorsh|forward(agent|x11)|forwardx11trusted|gatewayports|gssapiauthentication|gssapidelegatecredentials|gssapikeyexchange|gssapirenewalforcesrekey|gssapitrustdns|hashknownhosts|hostbasedauthentication|identitiesonly|kbdinteractiveauthentication|(tcp|)keepalive|nohostauthenticationforlocalhost|passwordauthentication|permitlocalcommand|proxyusefdpass|pubkeyauthentication|rhosts(|rsa)authentication|rsaauthentication|streamlocalbindunlink|usersh|kerberos(authentication|tgtpassing)|useprivilegedport|visualhostkey)=*) + (#i)(batchmode|canonicalizefallbacklocal|checkhostip|clearallforwardings|compression|enableescapecommandline|enablesshkeysign|exitonforwardfailure|fallbacktorsh|forkafterauthentication|forward(agent|x11)|forwardx11trusted|gatewayports|gssapiauthentication|gssapidelegatecredentials|gssapikeyexchange|gssapirenewalforcesrekey|gssapitrustdns|hashknownhosts|hostbasedauthentication|identitiesonly|kbdinteractiveauthentication|tcpkeepalive|nohostauthenticationforlocalhost|passwordauthentication|permitlocalcommand|permitremoteopen|proxyusefdpass|stdinnull|streamlocalbindunlink|visualhostkey)=*) _wanted values expl 'truth value' compadd yes no && ret=0 ;; + (#i)addkeystoagent=*) + _alternative \ + 'timeouts: :_numbers -u seconds "time interval" :s:seconds m:minutes h:hours d:days w:weeks' \ + 'values:value:(yes no ask confirm)' && ret=0 + ;; (#i)addressfamily=*) _wanted values expl 'address family' compadd any inet inet6 && ret=0 ;; (#i)bindaddress=*) _wanted bind-addresses expl 'bind address' _bind_addresses && ret=0 ;; + (#i)bindinterface=*) + _wanted bind-interfaces expl 'bind interface' _network_interfaces && ret=0 + ;; (#i)canonicaldomains=*) _message -e 'canonical domains (space separated)' && ret=0 ;; @@ -340,23 +361,27 @@ _ssh () { (#i)ciphers=*) state=ciphers ;; + (#i)certificatefile=*) + _description files expl 'file' + _files "$expl[@]" && ret=0 + ;; (#i)connectionattempts=*) _message -e 'connection attempts' && ret=0 ;; (#i)connecttimeout=*) - _message -e 'connection timeout' && ret=0 + _numbers -u seconds timeout :s:seconds m:minutes h:hours d:days w:weeks && ret=0 ;; (#i)controlmaster=*) - _wanted values expl 'truthish value' compadd yes no auto autoask && ret=0 + _wanted values expl 'truthish value' compadd yes no auto ask autoask && ret=0 ;; (#i)controlpath=*) _description files expl 'path to control socket' _files "$expl[@]" && ret=0 ;; (#i)controlpersist=*) - _message -e 'timeout' - ret=0 - _wanted values expl 'truth value' compadd yes no && ret=0 + _alternative \ + 'timeouts: :_numbers -u seconds timeout :s:seconds m:minutes h:hours d:days w:weeks' \ + 'values:truth value:(yes no)' && ret=0 ;; (#i)escapechar=*) _message -e 'escape character (or `none'\'')' @@ -377,9 +402,10 @@ _ssh () { (#i)hostname=*) _wanted hosts expl 'real host name to log into' _ssh_hosts && ret=0 ;; - (#i)(hostbasedkeytypes|hostkeyalgorithms|pubkeyacceptedkeytypes)=*) - _wanted key-types expl 'key type' _sequence compadd - $(_call_program key-types ssh -Q key) && ret=0 - ;; + (#i)identityagent=*) + _description files expl 'socket file' + _files -g "*(-=)" "$expl[@]" && ret=0 + ;; (#i)identityfile=*) _description files expl 'SSH identity file' _files "$expl[@]" && ret=0 @@ -410,13 +436,16 @@ _ssh () { _values -s , 'keyboard-interactive authentication method' \ 'bsdauth' 'pam' 'skey' && ret=0 ;; - (#i)(kexalgorithms|gssapikexalgorithms)=*) + (#i)kexalgorithms=*) _wanted algorithms expl 'key exchange algorithm' _sequence compadd - \ $(_call_program algorithms ssh -Q kex) && ret=0 ;; - (#i)localcommand=*) - _description commands expl 'run command locally after connecting' - _command_names && ret=0 + (#i)gssapikexalgorithms=*) + _wanted algorithms expl 'key exchange algorithm' _sequence compadd - \ + $(_call_program algorithms ssh -Q kex-gss) && ret=0 + ;; + (#i)(local|knownhosts)command=*) + _command_names -e && ret=0 ;; (#i)loglevel=*) _values 'log level' QUIET FATAL ERROR INFO VERBOSE\ @@ -429,8 +458,8 @@ _ssh () { _message -e 'number of password prompts' ret=0 ;; - (#i)pkcs11provider=*) - _description files expl 'PKCS#11 shared library' + (#i)(pkcs11|securitykey)provider=*) + _description files expl 'shared library' _files -g '*.(so|dylib)(|.<->)(-.)' "$expl[@]" && ret=0 ;; (#i)port=*) @@ -441,6 +470,17 @@ _ssh () { _values -s , 'authentication method' gssapi-with-mic \ hostbased publickey keyboard-interactive password && ret=0 ;; + (#i)proxyjump=*) + compset -P "* " + state=userhost + ;; + (#i)(hostkey|(hostbased|pubkey)accepted)algorithms=*) + _wanted key-types expl 'key type' _sequence compadd - \ + $(_call_program key-types ssh -Q key-sig) && ret=0 + ;; + (#i)pubkeyauthentication=*) + _wanted values expl 'enable' compadd yes no unbound host-bound && ret=0 + ;; (#i)protocol=*) _values -s , 'protocol version' \ '1' \ @@ -450,7 +490,13 @@ _ssh () { _cmdstring && ret=0 ;; (#i)rekeylimit=*) - _message -e 'maximum number of bytes transmitted before renegotiating session key' + if compset -P "* "; then + _numbers -u seconds "maximum time before renegotiating session key" \ + :s:seconds h:hours d:days w:weeks + else + _numbers -u bytes "maximum amount of data transmitted before renegotiating session key" \ + K:kilobytes M:megabytes G:gigabytes + fi ret=0 ;; (#i)requesttty=*) @@ -460,6 +506,9 @@ _ssh () { 'force[always request a TTY]' \ 'auto[request a TTY when opening a login session]' && ret=0 ;; + (#i)requiredrsasize=) + _wanted sizes expl 'minimum size [1024]' compadd 1024 2048 4096 && ret=0 + ;; (#i)revokedhostkeys=*) _description files expl 'revoked host keys file' _files "$expl[@]" && ret=0 @@ -478,6 +527,9 @@ _ssh () { (#i)streamlocalbindmask=*) _message -e 'octal mask' && ret=0 ;; + (#i)sessiontype=*) + _wanted session-types expl "session type" compadd none subsystem default && ret=0 + ;; (#i)stricthostkeychecking=*) _wanted values expl 'value' compadd yes no ask accept-new off && ret=0 ;; @@ -512,15 +564,18 @@ _ssh () { _description files expl 'xauth program' _files "$expl[@]" -g '*(-*)' && ret=0 ;; + *) _message -e values value ;; esac else - # old options are after the empty "\"-line + # Include, Host and Match not supported from the command-line + # final GSSAPI options are not in upstream but are widely patched in _wanted values expl 'configure file option' \ compadd -M 'm:{a-z}={A-Z} r:[^A-Z]||[A-Z]=* r:|=*' -q -S '=' - \ AddKeysToAgent \ AddressFamily \ BatchMode \ BindAddress \ + BindInterface \ CanonicalDomains \ CanonicalizeFallbackLocal \ CanonicalizeHostname \ @@ -528,7 +583,6 @@ _ssh () { CanonicalizePermittedCNAMEs \ CASignatureAlgorithms \ CertificateFile \ - ChallengeResponseAuthentication \ CheckHostIP \ Ciphers \ ClearAllForwardings \ @@ -539,10 +593,12 @@ _ssh () { ControlPath \ ControlPersist \ DynamicForward \ + EnableEscapeCommandline \ EnableSSHKeysign \ EscapeChar \ ExitOnForwardFailure \ FingerprintHash \ + ForkAfterAuthentication \ ForwardAgent \ ForwardX11 \ ForwardX11Timeout \ @@ -550,19 +606,13 @@ _ssh () { GatewayPorts \ GlobalKnownHostsFile \ GSSAPIAuthentication \ - GSSAPIClientIdentity \ GSSAPIDelegateCredentials \ - GSSAPIKeyExchange \ - GSSAPIRenewalForcesRekey \ - GSSAPIServerIdentity \ - GSSAPITrustDns \ - GSSAPIKexAlgorithms \ HashKnownHosts \ + HostbasedAcceptedAlgorithms \ HostbasedAuthentication \ - HostbasedKeyTypes \ HostKeyAlgorithms \ HostKeyAlias \ - HostName \ + Hostname \ IdentitiesOnly \ IdentityAgent \ IdentityFile \ @@ -571,33 +621,38 @@ _ssh () { KbdInteractiveAuthentication \ KbdInteractiveDevices \ KexAlgorithms \ + KnownHostsCommand \ LocalCommand \ LocalForward \ LogLevel \ + LogVerbose \ MACs \ NoHostAuthenticationForLocalhost \ NumberOfPasswordPrompts \ PasswordAuthentication \ PermitLocalCommand \ + PermitRemoteOpen \ PKCS11Provider \ Port \ PreferredAuthentications \ ProxyCommand \ ProxyJump \ ProxyUseFdpass \ - PubkeyAcceptedKeyTypes \ PubkeyAuthentication \ + PubkeyAcceptedAlgorithms \ RekeyLimit \ RemoteCommand \ RemoteForward \ RequestTTY \ + RequiredRSASize \ RevokedHostKeys \ - RhostsRSAAuthentication \ - RSAAuthentication \ + SecurityKeyProvider \ SendEnv \ ServerAliveCountMax \ ServerAliveInterval \ SetEnv \ + SessionType \ + StdinNull \ StreamLocalBindMask \ StreamLocalBindUnlink \ StrictHostKeyChecking \ @@ -606,24 +661,17 @@ _ssh () { Tunnel \ TunnelDevice \ UpdateHostKeys \ - UsePrivilegedPort \ User \ UserKnownHostsFile \ VerifyHostKeyDNS \ VisualHostKey \ XAuthLocation \ - \ - AFSTokenPassing \ - FallBackToRsh \ - KeepAlive \ - KerberosAuthentication \ - KerberosTgtPassing \ - PreferredAuthentications \ - ProtocolKeepAlives \ - RhostsAuthentication \ - SetupTimeOut \ - SmartcardDevice \ - UseRsh \ + GSSAPIClientIdentity \ + GSSAPIKeyExchange \ + GSSAPIRenewalForcesRekey \ + GSSAPIServerIdentity \ + GSSAPITrustDns \ + GSSAPIKexAlgorithms \ && ret=0 fi ;; @@ -693,6 +741,10 @@ _ssh () { _normal return ;; + destinations) + compset -P 1 '*>' + compset -S '>*' + ;& # fall-through userhost) if compset -P '*@'; then _wanted hosts expl 'remote host name' _ssh_hosts && ret=0 -- cgit v1.2.3 From ba3631b4148dcd7c645354e28a8b4c7fdde9a2b7 Mon Sep 17 00:00:00 2001 From: Jun-ichi Takimoto Date: Tue, 18 Apr 2023 13:03:39 +0900 Subject: 51663: fix a typo in 51582 (_ssh) --- ChangeLog | 4 ++++ Completion/Unix/Command/_ssh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_ssh') diff --git a/ChangeLog b/ChangeLog index 981fdacd3..01167b0c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2023-04-18 Jun-ichi Takimoto + + * 51663: Completion/Unix/Command/_ssh: fix a typo in 51582 + 2023-04-17 Peter Stephenson * 51652 (plus typo correction): Src/exec.c, Test/C03traps.ztst: diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh index e9ca454b4..fd2a90b59 100644 --- a/Completion/Unix/Command/_ssh +++ b/Completion/Unix/Command/_ssh @@ -27,7 +27,7 @@ _ssh () { '-r[recursively copy directories (follows symbolic links)]' '-S+[specify ssh program]:path to ssh:_command_names -e' '-v[verbose mode]' - '*(-O)-X+[specify sftp protocol option]: : _values "sftp option" + '(-O)*-X+[specify sftp protocol option]: : _values "sftp option" "nrequests[set max concurrent SFTP read or write requests]\:requests [64]" "buffer[set max buffer size for a single SFTP read/write operation]\: \:_numbers -l 0 -m 256K -d 32K -u bytes -f size \:B\:bytes \:K\:kilobytes"' ) -- cgit v1.2.3 From c0caef561323b91ea0c4aa101b564f92ab51b68d Mon Sep 17 00:00:00 2001 From: Jun-ichi Takimoto Date: Mon, 4 Sep 2023 15:07:52 +0900 Subject: 52112: use '_normal -p subcmd' to complete only external command --- ChangeLog | 12 ++++++++++++ Completion/BSD/Command/_jexec | 2 +- Completion/Linux/Command/_chrt | 2 +- Completion/Linux/Command/_cpupower | 2 +- Completion/Linux/Command/_ionice | 2 +- Completion/Linux/Command/_setpriv | 2 +- Completion/Linux/Command/_sysstat | 2 +- Completion/Unix/Command/_chroot | 2 +- Completion/Unix/Command/_mosh | 4 ++-- Completion/Unix/Command/_route | 2 +- Completion/Unix/Command/_screen | 2 +- Completion/Unix/Command/_script | 2 +- Completion/Unix/Command/_ssh | 4 ++-- Completion/Unix/Command/_stdbuf | 2 +- Completion/Unix/Command/_timeout | 2 +- 15 files changed, 28 insertions(+), 16 deletions(-) (limited to 'Completion/Unix/Command/_ssh') diff --git a/ChangeLog b/ChangeLog index 1fc00562c..0c782f617 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2023-09-04 Jun-ichi Takimoto + + * 52112: Completion/BSD/Command/_jexec, + Completion/Linux/Command/_chrt, Completion/Linux/Command/_cpupower, + Completion/Linux/Command/_ionice,Completion/Linux/Command/_setpriv, + Completion/Linux/Command/_sysstat, Completion/Unix/Command/_chroot, + Completion/Unix/Command/_mosh, Completion/Unix/Command/_route, + Completion/Unix/Command/_screen, Completion/Unix/Command/_script, + Completion/Unix/Command/_ssh, Completion/Unix/Command/_stdbuf, + Completion/Unix/Command/_timeout: use '_normal -p $service' to + complete only external commands + 2023-09-03 Bart Schaefer * users/29220: Src/Modules/param_private.c, Test/V10private.ztst: diff --git a/Completion/BSD/Command/_jexec b/Completion/BSD/Command/_jexec index 6a2d05a81..cd99ebe91 100644 --- a/Completion/BSD/Command/_jexec +++ b/Completion/BSD/Command/_jexec @@ -6,7 +6,7 @@ _jexec_normal() { # relative paths are relative to the jail's root path=( "$(_call_program paths jls -j $words[1] path)"/$^path ) shift 1 words; (( CURRENT-- )) - _normal + _normal -p $service } _jexec() { diff --git a/Completion/Linux/Command/_chrt b/Completion/Linux/Command/_chrt index 6789b66cf..5431b0799 100644 --- a/Completion/Linux/Command/_chrt +++ b/Completion/Linux/Command/_chrt @@ -62,7 +62,7 @@ elif (( CURRENT == 1 )); then else shift words (( CURRENT-- )) - _normal && ret=0 + _normal -p $service && ret=0 fi return ret diff --git a/Completion/Linux/Command/_cpupower b/Completion/Linux/Command/_cpupower index 6763bdd12..d342b69d9 100644 --- a/Completion/Linux/Command/_cpupower +++ b/Completion/Linux/Command/_cpupower @@ -95,7 +95,7 @@ case $state in '-i+[measurement interval]:interval (seconds)' '-c[schedule on every core]' '-v[increase verbosity]' - '*:::command: _normal' + '*:::command: _normal -p $service' ) ;; esac diff --git a/Completion/Linux/Command/_ionice b/Completion/Linux/Command/_ionice index ba403ca56..9989cd6a9 100644 --- a/Completion/Linux/Command/_ionice +++ b/Completion/Linux/Command/_ionice @@ -28,7 +28,7 @@ if [[ -n $state ]]; then elif (( $+opt_args[args--u] || $+opt_args[args---uid] )); then _message -e uids 'user id' else - _normal && ret=0 + _normal -p $service && ret=0 fi fi diff --git a/Completion/Linux/Command/_setpriv b/Completion/Linux/Command/_setpriv index 196f2f627..9e38152b9 100644 --- a/Completion/Linux/Command/_setpriv +++ b/Completion/Linux/Command/_setpriv @@ -96,7 +96,7 @@ _arguments -C -S -s \ '--selinux-label[request a selinux label]:SELinux labels: ' \ '--apparmor-profile[request an apparmor profile]:AppArmor profiles: ' \ '--reset-env[set environment as for a classic login shell]' \ - '*:::command:_normal' \ + '*:::command: _normal -p $service' \ && return 0 case $state in diff --git a/Completion/Linux/Command/_sysstat b/Completion/Linux/Command/_sysstat index 5620da73d..0baae0764 100644 --- a/Completion/Linux/Command/_sysstat +++ b/Completion/Linux/Command/_sysstat @@ -130,7 +130,7 @@ _pidstat() { _arguments -s : \ '-C[filter tasks by string]:task filter' \ '-d[report I/O statistics]' \ - '-e[execute specified program and monitor it with pidstat]:*::command: _normal' \ + '-e[execute specified program and monitor it with pidstat]:*::command: _normal -p $service' \ '-H[display timestamp in seconds since the epoch]' \ '-h[display horizontally]' \ '-I[divide CPU usage by number of processors]' \ diff --git a/Completion/Unix/Command/_chroot b/Completion/Unix/Command/_chroot index 516992694..a9c577bd7 100644 --- a/Completion/Unix/Command/_chroot +++ b/Completion/Unix/Command/_chroot @@ -33,7 +33,7 @@ case $variant in ;; esac -args+=( '1:new root directory:_directories' '*:::command:_normal' ) +args+=( '1:new root directory:_directories' '*::: : _normal -p $service' ) _arguments -s -S : $args && ret=0 diff --git a/Completion/Unix/Command/_mosh b/Completion/Unix/Command/_mosh index 7d1250320..6d0f746f8 100644 --- a/Completion/Unix/Command/_mosh +++ b/Completion/Unix/Command/_mosh @@ -7,7 +7,7 @@ _arguments -C \ '(-)--help[display help information]' \ '(-)--version[display version information]' \ "--no-init[don't set terminal init string]" \ - '--ssh=[specify ssh command to setup session]:ssh command:_normal' \ + '--ssh=[specify ssh command to setup session]:ssh command: _cmdstring' \ '--port=[specify server-side port range]:port:_sequence -n 2 -s \: _ports' \ '(-a -n)--predict=[control speculative local echo]:mode:(adaptive always never)' \ '(--predict -n)-a[synonym for --predict=always]' \ @@ -22,7 +22,7 @@ _arguments -C \ '--local[run mosh-server locally without using ssh]' \ '--experimental-remote-ip=[select method for discovering remote IP address to use for mosh]:method:(local remote proxy)' \ '1:remote host name:->userhost' \ - '*:::args:_normal' && ret=0 + '*::: : _normal -p $service' && ret=0 case $state in userhost) diff --git a/Completion/Unix/Command/_route b/Completion/Unix/Command/_route index 95df6d936..f0775a5d2 100644 --- a/Completion/Unix/Command/_route +++ b/Completion/Unix/Command/_route @@ -196,7 +196,7 @@ if [[ -n $state ]]; then if [[ $line[1] = exec ]]; then shift words (( CURRENT-- )) - _normal + _normal -p $service && return elif [[ $line[1] = (flush|monitor) ]]; then sequential=() fi diff --git a/Completion/Unix/Command/_screen b/Completion/Unix/Command/_screen index 6d47d2638..9336ae82d 100644 --- a/Completion/Unix/Command/_screen +++ b/Completion/Unix/Command/_screen @@ -107,7 +107,7 @@ if [[ -n $state ]]; then elif (( CURRENT > 2 )) && [[ ${words[1]} == /dev/* ]]; then _message "no more parameters" else - _normal + _normal -p $service fi ;; attached-sessions) diff --git a/Completion/Unix/Command/_script b/Completion/Unix/Command/_script index 7a3960be0..f39cfe535 100644 --- a/Completion/Unix/Command/_script +++ b/Completion/Unix/Command/_script @@ -68,7 +68,7 @@ case $OSTYPE in '-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' + '*:::arguments: _normal $service' ) ;| darwin*|freebsd*) diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh index fd2a90b59..0ba1f3775 100644 --- a/Completion/Unix/Command/_ssh +++ b/Completion/Unix/Command/_ssh @@ -136,7 +136,7 @@ _ssh () { '(-k -c)-s[force sh-style shell]' \ '-t+[set default maximum lifetime for identities]: :_numbers -u seconds "maximum lifetime" \:s\:seconds m\:minutes h\:hours d\:days w\:weeks' \ '-v[verbose mode]' \ - '*::command: _normal' + '*::command: _normal -p $service' return ;; ssh-keygen) @@ -738,7 +738,7 @@ _ssh () { local -a _comp_priv_prefix shift 1 words (( CURRENT-- )) - _normal + _normal -p $service return ;; destinations) diff --git a/Completion/Unix/Command/_stdbuf b/Completion/Unix/Command/_stdbuf index 4b7d98ba0..32b3cae2f 100644 --- a/Completion/Unix/Command/_stdbuf +++ b/Completion/Unix/Command/_stdbuf @@ -27,6 +27,6 @@ for ((i=1;i<=3;i++)); do "(${short[i]})${long[i]}=${(e)opt}" ) done -(( CURRENT > 2 )) && args+=( '*::command:_normal' ) +(( CURRENT > 2 )) && args+=( '*::command: _normal -p $service' ) _arguments -s -S $args diff --git a/Completion/Unix/Command/_timeout b/Completion/Unix/Command/_timeout index c041283ac..9c7f1a004 100644 --- a/Completion/Unix/Command/_timeout +++ b/Completion/Unix/Command/_timeout @@ -17,4 +17,4 @@ _arguments -S -A "-" $args \ '(-s --signal)'{-s,--signal}'[specify the signal to send on timeout]:signal:_signals' \ '(-k --kill-after)'{-k,--kill-after}'[followup first signal with SIGKILL if command persists after specified time]:time' \ '1: :_numbers -f -u seconds duration :s:seconds m:minutes h:hours d:days' \ - '*:::command:_normal' + '*:::command: _normal -p $service' -- cgit v1.2.3 From 985952e2f616c816e24c4cf5aee70416e4f23e07 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Wed, 11 Oct 2023 00:57:16 +0200 Subject: 52217: update completions for FreeBSD 14 --- ChangeLog | 13 ++++ Completion/BSD/Command/_freebsd-update | 1 + Completion/BSD/Command/_ipfw | 137 +++++++++++++++++++-------------- Completion/BSD/Command/_pfctl | 5 +- Completion/BSD/Command/_sockstat | 8 ++ Completion/Unix/Command/_cmp | 14 +++- Completion/Unix/Command/_date | 4 +- Completion/Unix/Command/_elfdump | 11 ++- Completion/Unix/Command/_gcore | 1 + Completion/Unix/Command/_ifconfig | 17 +++- Completion/Unix/Command/_iostat | 2 +- Completion/Unix/Command/_ldd | 3 +- Completion/Unix/Command/_ls | 13 ++-- Completion/Unix/Command/_mktemp | 54 ++++++------- Completion/Unix/Command/_netstat | 3 + Completion/Unix/Command/_script | 6 +- Completion/Unix/Command/_service | 5 +- Completion/Unix/Command/_split | 13 +++- Completion/Unix/Command/_ssh | 2 +- Completion/Unix/Command/_sysctl | 8 +- Completion/Unix/Type/_diff_options | 17 ++-- 21 files changed, 213 insertions(+), 124 deletions(-) (limited to 'Completion/Unix/Command/_ssh') diff --git a/ChangeLog b/ChangeLog index 9a5204ce7..cfc1a2841 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,18 @@ 2023-10-10 Oliver Kiddle + * 52217: Completion/BSD/Command/_freebsd-update, + Completion/BSD/Command/_ipfw, Completion/BSD/Command/_pfctl, + Completion/BSD/Command/_sockstat, Completion/Unix/Command/_cmp, + Completion/Unix/Command/_date, Completion/Unix/Command/_elfdump, + Completion/Unix/Command/_gcore, Completion/Unix/Command/_mktemp, + Completion/Unix/Command/_iostat, Completion/Unix/Command/_ldd, + Completion/Unix/Command/_ls, Completion/Unix/Command/_ifconfig, + Completion/Unix/Command/_netstat, Completion/Unix/Command/_script, + Completion/Unix/Command/_service, Completion/Unix/Command/_split, + Completion/Unix/Command/_ssh, Completion/Unix/Command/_sysctl, + Completion/Unix/Type/_diff_options: + update completions for FreeBSD 14 + * 52216: Src/Modules/watch.c: metafy usernames to allow for them to be UTF-8 encoded diff --git a/Completion/BSD/Command/_freebsd-update b/Completion/BSD/Command/_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=$'/[^ \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=( \| \) ) +dummynet=( + $'/(pipe|queue|sched)[ \t\0]/' -'pqs=${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}={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 [1024]"' + \| $'/quantum[ \t\0]/' ':parameters:parameter:$ca -F line quantum limit 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 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 interval 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 probability' + \| $word ':options:option:$ca -F line alpha beta max_burst max_ecnth {,no}{ecn,capdrop,drand} onoff dre ts' \) \# + '/[]/' + \| // '-[[ $pqs = pipe ]]' $'/noerror[ \t\0]/' ':options:option:$ca -F line bw delay burst profile buckets mask noerror plr queue red gred codel pie' + \| // '-[[ $pqs = queue ]]' $'/noerror[ \t\0]/' ':options:option:$ca -F line pipe weight buckets mask noerror plr queue red gred codel pie' + \| // '-[[ $pqs = sched ]]' $'/[]/' ':options:option:$ca -F line type bw delay burst profile' + \) \# +) + actions=( $'/[^\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=( \| $'/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=${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}={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 [1024]"' - \| $'/quantum[ \t\0]/' ':parameters:parameter:$ca -F line quantum limit 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 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 interval 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 probability' - \| $word ':options:option:$ca -F line alpha beta max_burst max_ecnth {,no}{ecn,capdrop,drand} onoff dre ts' \) \# - '/[]/' - \| // '-[[ $pqs = pipe ]]' $'/noerror[ \t\0]/' ':options:option:$ca -F line bw delay burst profile buckets mask noerror plr queue red gred codel pie' - \| // '-[[ $pqs = queue ]]' $'/noerror[ \t\0]/' ':options:option:$ca -F line pipe weight buckets mask noerror plr queue red gred codel pie' - \| // '-[[ $pqs = sched ]]' $'/[]/' ':options:option:$ca -F line type bw delay burst profile' - \) \# + \| $dummynet \| # sysctl shortcuts $'/(en|dis)able[ \t\0]/' ':sysctl-shortcuts:sysctl shortcut:$ca enable disable' $word ':values:value:(firewall altq one_pass debug verbose dyn_keepalive)' @@ -292,11 +298,36 @@ actions=( \) ) -if (( $words[(I)-p*] )); then - pathname=( ':path:_files -P / -W /' ) -fi +case $service in + ipfw) + _regex_arguments _ipfw_actions "$actions[@]" + args=( + '!-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+=( ':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:_command_names -e' \ + '-v[verbose]' \ '*:::actions:= _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+=( '-P[display ports numerically]' ) + args+=( + '-M[kill matching states in the opposite direction]' + '-P[display ports numerically]' + ) ;; esac diff --git a/Completion/BSD/Command/_sockstat b/Completion/BSD/Command/_sockstat 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+=( + '-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)"$(.*|openbsd*) + args+=( '-z+[specify timezone for output]:time zone:_time_zone') ;| netbsd*) args+=( '-d[output date specified by string]:time string:' ) diff --git a/Completion/Unix/Command/_elfdump b/Completion/Unix/Command/_elfdump index 065f4b97f..b3cc77695 100644 --- a/Completion/Unix/Command/_elfdump +++ b/Completion/Unix/Command/_elfdump @@ -34,10 +34,15 @@ case $OSTYPE in '-l[show long section names without truncation]' '-O[specify osabi to apply]:osabi' '-P[use alternative section header]' - "*:elf file:_object_files" ) ;; - freebsd*) args+=( '-a[dump all information]' ) ;; + freebsd*) + args+=( + '-a[dump all information]' + '(-)-E[return success if file is an ELF file and failure if not]' + ) + ;; esac -_arguments -s $args +_arguments -s $args \ + "*:elf file:_object_files" diff --git a/Completion/Unix/Command/_gcore b/Completion/Unix/Command/_gcore index a31a81267..ef3afd919 100644 --- a/Completion/Unix/Command/_gcore +++ b/Completion/Unix/Command/_gcore @@ -46,6 +46,7 @@ case $OSTYPE in _arguments -s \ '-c+[write core file to specified file]:file:_files' \ '-f[dump all available segments]' \ + '-k[use the ptrace(2) PT_COREDUMP kernel facility to write the core dump]' \ '::executable:' \ ':pid:_pids' ;; diff --git a/Completion/Unix/Command/_ifconfig b/Completion/Unix/Command/_ifconfig index 25ddd55bd..4e1f25e2e 100644 --- a/Completion/Unix/Command/_ifconfig +++ b/Completion/Unix/Command/_ifconfig @@ -20,10 +20,20 @@ case $OSTYPE in ) ;; freebsd*|dragonfly*) - args=( -s $updown - '(-a -l -u -d -m -L 1 *)-C[list interface cloners]' + 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)" + "inet[adjust inet subnet mask display]\:format [hex]\:(default cidr dotted hex)" + "inet6[adjust inet6 prefix display]\:format [numeric]\:(default cidr numeric)"' + '(-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 @@ -37,6 +47,9 @@ case $OSTYPE in roam roam:rssi roam:rate roaming ) ;| + freebsd<14->.*) + args+=( '(-C)-j+[perform actions inside jail]:jail:_jails' ) + ;; dragonfly*) args+=( '-n[disable auto-loading of kernel network interface driver]' ) ;; diff --git a/Completion/Unix/Command/_iostat b/Completion/Unix/Command/_iostat index 1152b0d8b..d3943fcb4 100644 --- a/Completion/Unix/Command/_iostat +++ b/Completion/Unix/Command/_iostat @@ -34,7 +34,6 @@ case $OSTYPE:l in args+=( '-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=( -s ) args=( '-c[display CPU utilization report]' + "--compact[don't break into sub-reports keeping metrics to a single line]" '-d[display device utilization report]' '--dec=-[specify the number of decimal places to use]:decimal places [2]:(0 1 2)' '-f[specify alternative directory to read device statistics from]:directory:_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=( '-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=gnu unix --help; then 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)' @@ -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=[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 numerically)]' + '(--sort -f -S -t -U -v)-X[sort by extension]' + '(-S -f -t -U -v -X)--sort=[specify sort key]:sort key:(size time none version extension)' '--color=-[control use of color]:color:(never always auto)' "*--hide=[like -I, but overridden by -a or -A]:pattern: " diff --git a/Completion/Unix/Command/_mktemp b/Completion/Unix/Command/_mktemp 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=BusyBox gnu='Free Soft' unix --version +_pick_variant -r variant busybox=BusyBox gnu='Free Soft' $OSTYPE --version args=( '(-d --directory)'{-d,--directory}'[make directory instead of file]' - '(: -)--help[display help information]' - '(-p --tmpdir)'{-p+,--tmpdir=}'[make relative to specified directory]: :_directories' '(-q --quiet)'{-q,--quiet}'[suppress error messages]' - '--suffix=[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 == *busybox* ]]; then # See also: _busybox - args=( ${args:#((#s)|*\))(\*|)--^help*} ) -elif [[ $variant != gnu ]]; then - args=( ${args:#((#s)|*\))(\*|)--*} ) -fi - -[[ $variant == gnu ]] || { - # BusyBox, OpenBSD, and Solaris have -p, but -t doesn't take an argument - if [[ $variant == *busybox* ]] || [[ $OSTYPE == (openbsd|solaris)* ]]; then - args=( ${args:#((#s)|*\))(\*|)-t*} ) - args+=( '-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=( ${args:#((#s)|*\))(1:*|(\*|)-[ptV]*)} ) +case $variant in + ^(dragonfly|darwin)*) + args+=( '(-p --tmpdir)'{-p+,--tmpdir=}'[make relative to specified directory]: :_directories' ) + ;| + gnu) + args+=( + '--suffix=[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=( ${args:#((#s)|*\))(\*|)--*} ) + ;| + gnu|*busybox*) + args+=( '(: -)--help[display help information]' ) + ;| + (gnu|*busybox|openbsd|solaris)*) + args+=( + '-t[generate template relative to temp dir]' + '1: :_guard "^-*" "template name"' + ) + ;; + (dragonfly|netbsd|freebsd|darwin)*) args+=( '-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/_netstat index 8016b2475..35d639f99 100644 --- a/Completion/Unix/Command/_netstat +++ b/Completion/Unix/Command/_netstat @@ -302,6 +302,9 @@ case $OSTYPE in memory+=( $Xopt) statistics+=( $Xopt ) pcb+=( $Mopts $popt ) ;; + freebsd<14->.*) + args+=( '-j+[run inside a jail]:jail:_jails' ) + ;& freebsd<13->.*) sockets+=( '-c[show TCP stack used for each session]' diff --git a/Completion/Unix/Command/_script b/Completion/Unix/Command/_script 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+=( + '-e[return exit status of the child process]' '-f[use filemon(4)]' + '(-a -r -k -t)-T[play back a recorded session, reporting only timestamps]: :_date_formats' ) ;| darwin*|dragonfly*|freebsd*) @@ -71,8 +73,6 @@ case $OSTYPE in '*:::arguments: _normal $service' ) ;| - darwin*|freebsd*) - ;| *) args+=( '(-p -d)-a[append output]' diff --git a/Completion/Unix/Command/_service b/Completion/Unix/Command/_service 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=( '-E+[set environment variable before executing the rc.d script]:variable:_parameters -g "*export*~*readonly*" -S=' ) + ;& freebsd<11->.*) - args=( '-j+[perform actions in specified jail]:jail:_jails' ) + args+=( '-j+[perform actions in specified jail]:jail:_jails' ) ;& freebsd*|dragonfly*) actions=( diff --git a/Completion/Unix/Command/_split b/Completion/Unix/Command/_split index c5ab0dc9b..5ecc1bb67 100644 --- a/Completion/Unix/Command/_split +++ b/Completion/Unix/Command/_split @@ -8,7 +8,7 @@ _pick_variant -r variant gnu=GNU $OSTYPE --version args=( '-a+[generate suffixes of specified length]:length [2]' \ - '(-l -p -n)-b+[put specified size in bytes in each output file]:size (bytes)' \ + '(-l -p -n)-b+[put specified size in bytes in each output file]: :_numbers -u bytes size k m g' \ '(-b -p -n)-l+[put specified number of lines/records in each output file]:lines' \ '1:file:_files' \ '2: :_guard "^-*" "prefix [x]"' @@ -19,8 +19,8 @@ case $variant in args=( -C '(H -a --suffix-length)'{-a+,--suffix-length=}'[generate suffixes of specified length]:length [2]' '(H)--additional-suffix=[append an additional suffix to file names]:suffix' - '(H -b --bytes -C --line-bytes -l --lines -n --number)'{-b+,--bytes=}'[put specified size in bytes in each output file]:size (bytes)' - '(H -b --bytes -C --line-bytes -l --lines -n --number)'{-C+,--line-bytes=}'[put whole lines/records up to size limit in each output file]:size (bytes)' + '(H -b --bytes -C --line-bytes -l --lines -n --number)'{-b+,--bytes=}'[put specified size in each output file]: :_numbers -M "m\:{a-zA-Z}={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=}'[put whole lines/records up to size limit in each output file]: :_numbers -M "m\:{a-zA-Z}={A-Za-z}" -u bytes size {K,M,G,T,P,E,Z}{,B}' '(H --numeric-suffixes -x --hex-suffixes)-d[use numeric suffixes starting at 0]' '(H -d -x --hex-suffixes)--numeric-suffixes=-[use numeric suffixes]::start value [0]' '(H -d --numeric-suffixes --hex-suffixes)-x[use hex suffixes starting at 0]' @@ -47,7 +47,12 @@ case $variant in '(-b -l -n)-p+[split the file whenever a line matches specified pattern]:pattern' ) ;| - freebsd*) args+=( '-d[use numeric suffixes]' ) ;; + freebsd*) + args+=( + '-d[use numeric suffixes]' + "-c[continue creating files and don't overwrite existing output files]" + ) + ;; esac _arguments -s -S $args && ret=0 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]:multiplex control command:((check\:"check master process is running" exit\:"request the master to exit" forward\:"request forward without command execution" stop\:"request the master to stop accepting further multiplexing requests" 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]:tag' \ '-p+[specify port on remote host]:port number on remote host' \ '(-v)*-q[quiet operation]' \ '*-R+[specify remote port forwarding]:remote port forwarding:->forward' \ diff --git a/Completion/Unix/Command/_sysctl b/Completion/Unix/Command/_sysctl 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+=( + '-F[print the format of the variable]' + '(-N)-l[show the length of variables along with their values]' + ) + ;| freebsd<11->.*) args+=( '-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 =]' \ "-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/_diff_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="$1" @@ -26,6 +26,8 @@ _diff_palette() { } if _pick_variant -r variant -c $cmd gnu=GNU unix -v || [[ $OSTYPE = freebsd<12->.* ]]; then + (( $#words > 2 )) && ign='!' + # output formats of="-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=GNU unix -v || [[ $OSTYPE = freebsd<12-> --unchanged-group-format" if [[ $variant = gnu ]]; then - (( $#words > 2 )) || args+=( - '(-v --version)'{-v,--version}'[display version information]' - '--help[display usage information]' - ) args+=( '(-H --speed-large-files)'{-H,--speed-large-files}'[assume large files and many small changes]' '(-E --ignore-tab-expansion)'{-E,--ignore-tab-expansion}'[ignore changes 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=}'[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=[set old group format]:old group format" "($ofwg $ouc $oss)--new-group-format=[set new group format]:new group format" "($ofwl $ouc $oss)--unchanged-line-format=[set unchanged line format]:unchanged line format" - '(--to-file)--from-file=[compare specified file to all operands]:from file:_files' \ - '(--from-file)--to-file=[compare all operands to specified file]:to file:_files' \ + '(--to-file)--from-file=[compare specified file to all operands]:from file:_files' + '(--from-file)--to-file=[compare all operands to specified file]:to file:_files' '--color=-[use colors in output]::when [auto]:(never always auto)' '--palette=[specify colors to use]:color:_diff_palette' + "${ign}(1 2)-v[display version information]" ) else args+=( '!--speed-large-files' ) @@ -99,6 +97,7 @@ if _pick_variant -r variant -c $cmd gnu=GNU unix -v || [[ $OSTYPE = freebsd<12-> "($of $oss)-u[output a unified diff]" \ "($ofwuc $oss)*"{-L+,--label=}'[set label to use instead of file name and timestamp]:label' \ "($ofwuc $oss -p --show-c-function)"{-p,--show-c-function}'[show C function of each change]' \ + "($ofwuc $oss -F --show-function-line)"{-F+,--show-function-line=}'[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=GNU unix -v || [[ $OSTYPE = 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=,-W+}'[set size of line]:number of characters per line' \ + "${ign}(1 2)--version[display version information]" \ + "${ign}(1 2)--help[display usage information]" \ "$@" else of='-c -e -f' -- cgit v1.2.3 From c7ae3701607a00162e19a7ba1e23aef3158acdd0 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Tue, 26 Mar 2024 00:06:05 +0100 Subject: 52798: handle comments in ssh config --- ChangeLog | 5 +++++ Completion/Unix/Command/_ssh | 3 ++- Completion/Unix/Type/_ssh_hosts | 11 ++++------- 3 files changed, 11 insertions(+), 8 deletions(-) (limited to 'Completion/Unix/Command/_ssh') diff --git a/ChangeLog b/ChangeLog index 72e8efbe7..582f75635 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024-03-25 Oliver Kiddle + + * 52798: Completion/Unix/Command/_ssh, + Completion/Unix/Type/_ssh_hosts: handle comments in ssh config + 2024-03-23 Mikael Magnusson * 52768: Completion/compdump, Completion/compinit: Handle diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh index dc3979a58..5e6e60573 100644 --- a/Completion/Unix/Command/_ssh +++ b/Completion/Unix/Command/_ssh @@ -101,6 +101,7 @@ _ssh () { '--apple-use-keychain[update keychain when adding/removing identities]' ) _arguments -C -s : $args \ + '-C[process certificates only]' \ '-c[identity is subject to confirmation via SSH_ASKPASS]' \ '-D[delete all identities]' \ '-d[remove identity]' \ @@ -214,7 +215,7 @@ _ssh () { "(${${(@)cmds:#-p}} -v ${${(@)cms:#-[qt]}})-N+[provide new passphrase]:new passphrase" \ "(${${(@)cmds:#-c}} -v $cms)-C+[provide new comment]:new comment" \ "(-D -I -h -n -V -A)-f+[$file file]:$file file:_files" \ - "$p1(${${(@)cmds:#-[FE]}} ${${(@)cmn:#-v}} ${${(@)cms:#-E}})-l[show fingerprint of key file]" \ + "(${${(@)cmds:#-[FE]}} ${${(@)cmn:#-v}} ${${(@)cms:#-E}})-l[show fingerprint of key file]" \ "$p1(${${(@)cmds:#-[iep]}} $cms)-m+[specify conversion format]:format [RFC4716]:(PEM PKCS8 RFC4716)" \ "$p1*-O+[specify a key/value option]: : _values 'option' $options" \ "(${${(@)cmds:#-[lGT]}} ${${(@)cmn:#-[bv]}} -f)*-v[verbose mode]" \ diff --git a/Completion/Unix/Type/_ssh_hosts b/Completion/Unix/Type/_ssh_hosts index a4a08ad91..b50e1c16a 100644 --- a/Completion/Unix/Type/_ssh_hosts +++ b/Completion/Unix/Type/_ssh_hosts @@ -24,7 +24,7 @@ if [[ -r $config ]]; then while (( idx <= $#lines )); do IFS=$'=\t ' read -r key line <<<"${lines[idx]}" if [[ "$key" == ((#i)match) ]]; then - match_args=(${(z)line}) + match_args=( ${(Z.C.)line} ) while [[ $#match_args -ge 2 ]]; do if [[ "${match_args[1]}" == (#i)(canonical|final|(|original)host) ]]; then key="Host" @@ -36,13 +36,10 @@ if [[ -r $config ]]; then fi case "$key" in ((#i)include) - lines[idx]=("${(@f)$(cd $HOME/.ssh; cat ${(z)~line})}") 2>/dev/null;; + lines[idx]=( "${(@f)$(cd $HOME/.ssh; cat ${(Z.C.)~line} 2>/dev/null)}" ) ;; ((#i)host(|name)) - for host in ${(z)line}; do - case $host in - (*[*?]*) ;; - (*) config_hosts+=("$host") ;; - esac + for host in ${(Z.C.)line}; do + [[ $host != *[*?%]* ]] && config_hosts+=( $host ) done ;& (*) (( ++idx ));; esac -- cgit v1.2.3 From 4e4274eda6012aead1f236502b163ba063bc465a Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Mon, 27 Jan 2025 23:10:16 +0100 Subject: 53328: completion options update --- ChangeLog | 12 +++ Completion/Linux/Command/_cpupower | 1 - Completion/Linux/Command/_cryptsetup | 32 ++++++- Completion/Linux/Command/_ethtool | 12 ++- Completion/Linux/Command/_iptables | 166 ++++++++++++++++++++++++++++++++++- Completion/Linux/Command/_selinux | 17 ++-- Completion/Linux/Command/_sshfs | 13 +-- Completion/Linux/Command/_valgrind | 8 +- Completion/Unix/Command/_abcde | 2 +- Completion/Unix/Command/_dig | 47 +++++----- Completion/Unix/Command/_flac | 17 ++-- Completion/Unix/Command/_gnutls | 5 +- Completion/Unix/Command/_jq | 27 +++--- Completion/Unix/Command/_pv | 11 +++ Completion/Unix/Command/_sqlite | 2 + Completion/Unix/Command/_ssh | 12 ++- Completion/X/Command/_zeal | 1 + 17 files changed, 321 insertions(+), 64 deletions(-) (limited to 'Completion/Unix/Command/_ssh') diff --git a/ChangeLog b/ChangeLog index c5db038e6..cb90a5736 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,17 @@ 2025-01-27 Oliver Kiddle + * 53328: Completion/Linux/Command/_cpupower, + Completion/Linux/Command/_cryptsetup, + Completion/Linux/Command/_ethtool, + Completion/Linux/Command/_iptables, + Completion/Linux/Command/_selinux, Completion/Linux/Command/_sshfs, + Completion/Linux/Command/_valgrind, Completion/Unix/Command/_abcde, + Completion/Unix/Command/_dig, Completion/Unix/Command/_flac, + Completion/Unix/Command/_gnutls, Completion/Unix/Command/_jq, + Completion/Unix/Command/_pv, Completion/Unix/Command/_sqlite, + Completion/Unix/Command/_ssh, Completion/X/Command/_zeal: + completion options update + * 53326: Completion/Linux/Command/_findmnt, Completion/Linux/Command/_free, Completion/Linux/Command/_losetup, Completion/Linux/Command/_lsblk, Completion/Linux/Command/_pidof, diff --git a/Completion/Linux/Command/_cpupower b/Completion/Linux/Command/_cpupower index d342b69d9..cb6f37fb0 100644 --- a/Completion/Linux/Command/_cpupower +++ b/Completion/Linux/Command/_cpupower @@ -20,7 +20,6 @@ cmds=( 'info:show global power parameters' 'set:set global power parameters' 'monitor:report frequency and idle statistics' - 'powercap-info:show powercapping related kernel and hardware configurations' 'help:print usage information' ) case $state in diff --git a/Completion/Linux/Command/_cryptsetup b/Completion/Linux/Command/_cryptsetup index f7149a76f..897eb94f9 100644 --- a/Completion/Linux/Command/_cryptsetup +++ b/Completion/Linux/Command/_cryptsetup @@ -13,7 +13,7 @@ _arguments -s \ '(-y --verify-passphrase)'{-y,--verify-passphrase}'[query for password twice]' \ '(-d --key-file)'{-d+,--key-file=}'[set keyfile]:key file:_files' \ '--master-key-file=[set master key]:key file:_files' \ - '--dump-master-key[dump luks master key]' \ + '--dump-volume-key[dump volume key instead of keyslots info]' \ '(-s --key-size)'{-s+,--key-size=}'[set key size]:size (bits)' \ '(-l --keyfile-size)'{-l+,--keyfile-size=}'[set keyfile size]:size (bytes)' \ '--keyfile-offset=[specify number of bytes to skip in keyfile]:offset (bytes)' \ @@ -37,8 +37,35 @@ _arguments -s \ '--shared[share device with another non-overlapping crypt segment]' \ '--uuid=[set device UUID]:uuid' \ '--allow-discards[allow discard (aka TRIM) requests for device]' \ + '--cancel-deferred[cancel previously set deferred device removal]' \ + '--disable-blkid[disable blkid on-disk signature detection and wiping]' \ + '--disable-external-tokens[disable loading of external LUKS2 token plugins]' \ + "--disable-veracrypt[don't scan for VeraCrypt compatible device]" \ + '--dump-json-metadata[dump info in JSON format (LUKS2 only)]' \ + '--dump-volume-key[dump volume key instead of keyslots info]' \ + '--external-tokens-path=[specify path to directory with external token handlers (plugins)]:path:_directories' \ + '--force-offline-reencrypt[force offline LUKS2 reencryption and bypass active device detection]' \ '--header=[device or file with separated LUKS header]:file:_files' \ - '--test-passphrase[do not activate device, just check passphrase]' \ + '--hw-opal[use HW OPAL encryption together with SW encryption]' \ + '--hw-opal-factory-reset[wipe WHOLE OPAL disk on luksErase]' \ + '--hw-opal-only[use only HW OPAL encryption]' \ + '--keep-key[do not change volume key]' \ + '--link-vk-to-keyring=[set keyring where to link volume key]:string' \ + '--new-keyfile=[read the key for a new slot from a file]:file:_files' \ + '--new-key-slot=[specify slot number for new key]:slot [first free]' \ + '--new-token-id=[token number]:number [any]' \ + '--progress-json[print progress data in json format]' \ + "--test-args[don't run action, just validate all command line parameters]" \ + '--volume-key-file=[use the volume key from file]:file:_files' \ + '--volume-key-keyring=[use the specified keyring key as a volume key]:key' \ + '(-B --block-size)'{-B+,--block-size=}'[reencryption block size]:block size (MiB)' \ + '(-N --new)'{-N,--new}'[create new header on not encrypted device]' \ + '--use-directio[use direct-io when accessing devices]' \ + '--use-fsync[use fsync after each block]' \ + '--write-log[update log file after every block]' \ + "--test-passphrase[don't activate device, just check passphrase]" \ + '--token-replace[replace the current token]' \ + '--token-type=[restrict allowed token types used to retrieve LUKS2 key]:string' \ '--tcrypt-hidden[use hidden header (hidden TCRYPT device)]' \ '--tcrypt-system[device is system TCRYPT drive (with bootloader)]' \ '--tcrypt-backup[use backup (secondary) TCRYPT header]' \ @@ -118,6 +145,7 @@ case $state in 'luksDump:dump header information' 'tcryptDump:dump TCRYPT device information' 'bitlkDump:dump BITLK device information' + 'fvault2Dump:dump FVAULT2 device information' 'luksSuspend:suspend LUKS device and wipe key' 'luksResume:resume suspended LUKS device' 'luksHeaderBackup:store binary backup of headers' diff --git a/Completion/Linux/Command/_ethtool b/Completion/Linux/Command/_ethtool index 3e3fc0b1d..8cff24e96 100644 --- a/Completion/Linux/Command/_ethtool +++ b/Completion/Linux/Command/_ethtool @@ -157,7 +157,7 @@ if [[ -n $state ]]; then _wanted files expl 'file' _files ;; rx-flow-hash) - _wanted flow-types expl 'flow type' compadd {tcp,udp,ah,esp,sctp}{4,6} + _wanted flow-types expl 'flow type' compadd {tcp,udp,ah,esp,sctp}{4,6} gtp{c{4,6}{,t},u{4,6}{,e,u,d}} ;; rule) _message -e ids 'rule id' @@ -177,6 +177,9 @@ if [[ -n $state ]]; then hfunc) _message -e functions 'hash function' ;; + xfrm) + _wanted transformations expl transformation compadd symmetric-xor none + ;; flags) _message -e masks mask ;; @@ -186,6 +189,9 @@ if [[ -n $state ]]; then power-mode-policy) _wanted policies expl 'policy' compadd high auto ;; + tcp-data-split) + _wanted states expl state compadd auto on off + ;; *) case ${${(Mk)opt_args:#cmd?*}[1]#cmd?-} in -a|--show-pause) @@ -209,7 +215,7 @@ if [[ -n $state ]]; then 'rx-mini[change number of ring entries for the RX Mini ring]' \ 'rx-jumbo[change number of ring entries for the RX Jumbo ring]' \ 'tx[change number of ring entries for the TX ring]' \ - rx-buf-len cqe-size tx-push rx-push tx-push-buf-len + rx-buf-len tcp-data-split cqe-size tx-push rx-push tx-push-buf-len ;; -d|--register-dump) _values -S ' ' -w 'option' \ @@ -306,7 +312,7 @@ if [[ -n $state ]]; then '(weight default)equal' \ '(equal default)weight' \ '(equal weight)default' \ - hkey hfunc delete + hkey hfunc xfrm delete ;; -f|--flash) if (( CURRENT == 4 )); then diff --git a/Completion/Linux/Command/_iptables b/Completion/Linux/Command/_iptables index 892c48710..0a901f0f2 100644 --- a/Completion/Linux/Command/_iptables +++ b/Completion/Linux/Command/_iptables @@ -128,6 +128,27 @@ while ) ;; comment) args+=( '--comment[add comment to rule]:comment' ) ;; + connbytes) + args+=( + '--connbytes:size (min\:[max])' + '--connbytes-dir:packets:(original reply both)' + '--connbytes-mode:mode:(packets bytes avgpkt)' + ) + ;; + connlabel) + args+=( + '--label[match if label name has been set on a connection]:label' + '--set[set label on connection]' + ) + ;; + connlimit) + args+=( + --connlimit-{upto,above}:connections + '--connlimit-mask:prefix length' + --connlimit-{s,d}addr + ) + ;; + connmark) args+=( --mark:value ) ;; conntrack) args+=( '--ctstate[match packet state]:state:->cfstates' @@ -136,18 +157,69 @@ while '--ctorigdst[match original destination address]:*^!:network:_hosts' '--ctreplsrc[match reply source address]:*^!:network:_hosts' '--ctrepldst[match reply destination address]:*^!:network:_hosts' + --ct{orig,repl}{src,dst}port':port:_ports' '--ctstatus[match internal conntrack states]:state:(NONE EXPECTED SEEN_REPLY ASSURED)' '--ctexpire[match remaining lifetime]:time' + '--ctdir:direction:(original reply)' + ) + ;; + cpu) args+=( --cpu:number ) ;; + dccp) + args+=( + --{s,d,source-,destination-}port:port:_ports + '--dccp-types:type:_sequence compadd - REQUEST RESPONSE DATA ACK DATAACK CLOSEREQ CLOSE RESET SYNC SYNCACK INVALID' + --dccp-option:option ) ;; + devgroup) args+=( --{src,dst}group:name ) ;; dscp) args+=( '--dscp[match DSCP field]:value' '--dscp-class[match the DiffServ class]:class' ) ;; + dst) args+=( --dst-len:length --dst-opts:type ) ;; + ecn) args+=( --ecn-{tcp-{cwr,ece},ip-ect} ) ;; esp) args+=( '--espspi[match SPIs in ESP header]:*^!:spi' ) ;; + frag) + args+=( + --fragid:id --fraglen:length + --frag{res,first,more,last} + ) + ;; + hashlimit) + args+=( + --hashlimit-{upto,above,burst}:amount + '--hashlimit-mode:object:_sequence compadd - srcip srcport dstip dstport' + --hashlimit-{src,dst}mask:prefix + --hashlimit-name:name + --hashlimit-htable-size:buckets + --hashlimit-htable-max:entries + --hashlimit-htable-{expire,gcinterval}:msec + --hashlimit-rate-match + --hashlimit-rate-intervale:sec + ) + ;; + hbh) args+=( --hbh-len:length --hbh-opts:type ) ;; helper) args+=( '--helper[match packets related to a conntrack-helper]:helper:(ftp)' ) ;; + hl) args+=( --hl-{eq,lt,gt}:value ) ;; + icmp) args+=( --icmp-type:type ) ;; + icmp6) args+=( --icmpv6-type:type ) ;; + iprange) args+=( --{src,dst}-range':IP range' ) ;; + ipv6header) + args+=( + --soft + '--header:header(hop dst route frag auth esp none prot)' + ) + ;; + ipvs) + args+=( + --ipvs --vproto:protocol --vaddr:address + --vport{,ctl}':port:_ports' + '--vdir:directory:(ORIGINAL REPLY)' + '--vmethod:method:(GATE IPIP MASQ)' + ) + ;; length) args+=( '--length[match packet length]:length' ) ;; limit) args+=( @@ -164,32 +236,120 @@ while '--ports[match where source and destination ports are equal]:ports:->port-list' ) ;; + nfacct) args+=( --nfacct-name:name ) ;; + osf) args+=( --genre:string --{ttl,log}:level ) ;; owner) args+=( '--uid-owner[match packet by user id of creating process]:user id' '--gid-owner[match packet by ggroup id of creating process]:group id' '--pid-owner[match packet by process id of creating process]:process id:_pids' '--sid-owner[match packet by session id of creating process]:session id' - '--cmd-owner[match packet by name of creating command]:command:_command_names -e' + --suppl-groups --socket-exists ) ;; physdev) args+=( '--physdev-in[specify bridge port via which packet is received]:name' '--physdev-out[specify bridge port via which packet is sent]:name' + --physdev-is-{in,out,bridged} ) ;; pkttype) args+=( '--pkt-type[match link-layer packet type]:type:(unicast broadcast multicast)' ) ;; + policy) + args+=( + '--dir:direction:(in out)' + '(--strict)--pol:policy:(none ipsec)' + '(--pol)--strict' + --reqid:id --spi:id + '--proto:encapsulation protocol:(ah esp ipcomp)' + '--mode:encapsulation mode:(tunnel transport)' + --tunnel-{src,dst}:addr --next + ) + ;; + quota) args+=( '--quota:quota (bytes)' ) ;; + rateest) + args+=( + --rateest-{delta,lt,gt,eq} + --rateest{,1,2}:name + --rateest-{bps,pps}{,1,2}:value + ) + ;; + realm) args+=( --realm:value ) ;; + recent) + args+=( + --name:name --r{source,dest} --mask:netmask + '(--rcheck --update --remove)--set' + '(--set --update --remove)--rcheck' + '(--set --rcheck --remove)--update' + '(--set --rcheck --update)--remove' + --seconds:seconds --reap --hitcount:hits --rttl + ) + ;; + rpfilter) args+=( --loose --validmark --accept-local --invert ) ;; + rt) + args+=( + --rt-type:type --rt-segsleft:number --rt-len:length + --rt-0-{res,not-strict} --rt-0-addrs:address + ) + ;; + sctp) + args+=( + --{s,d,source-,destination-}port:port:_ports + '--chunk-types:match type:(all any only):chunk type' + ) + ;; + set) + args+=( + '--match-set:set: :flag' + --return-nomatch --update-counters --update-subcounters + --{packet,byte}s-{eq,lt,gt}:value + ) + ;; + socket) args+=( --transparent --nowildcard --restore-skmark ) ;; state) args+=( '--state[match packet state]:state:->states' ) ;; + statistic) args+=( --mode:mode --{probability,every,packet}:value ) ;; + string) + args+=( + '--algo:strategy:(bm kmp)' + --{from,to}:offset + --{,hex}string:pattern + -icase + ) + ;; + tcp) + args+=( + --{s,d,source-,destination-}port:port:_ports + '--tcp-flags:mask:->tcp-flags:comp:->tcp-flags' + --syn --tcp-option:option + ) + ;; + tcpmss) args+=( --mss:value ) ;; + time) + args+=( + --date{start,stop}:date --time{start,stop}:time + --{month,week}days:day + --contiguous --kerneltz + ) + ;; tos) args+=( '--tos[match type of service field]:type of service:->tos' ) ;; - ttl) args+=( '--ttl[match type to live]:TTL value' ) ;; + ttl) args+=( '--ttl-'{eq,lt,gt}':TTL value' ) ;; + u32) args+=( '--u32:tests' ) ;; + udp) args+=( --{s,d,source-,destination-}port:port:_ports ) ;; esac done +if (( CURRENT > 2 )); then + if [[ $words[CURRENT-1] = (|\\)\! && ! -prefix - ]]; then + args+=( '*: :compadd -S "" - -' ) + else + args+=( '*:negation:(!)' ) + fi +fi + _arguments -C -s \ '(-)'{-h,--help}'[print program information]' \ '(-)'{-V,--version}'[print version information]' \ @@ -211,13 +371,13 @@ _arguments -C -s \ "($cmds -s --src --source)"{-s,--src,--source}'[specify source]:*^!:network:_sequence _hosts' \ "($cmds -d --dst --destination)"{-d,--dst,--destination}'[specify destination]:*^!:network:_sequence _hosts' \ "($cmds -j --jump)"{-j,--jump}'[specify rule target]:target:->targets' \ + "($cmds -g --goto)"{-g,--goto}'[jump to chain with no return]:target:->targets' \ "($cmds -i --in-interface)"{-i,--in-interface}'[specify interface via which packet is received]:*^!:interface:_net_interfaces' \ "($cmds -o --out-interface)"{-o,--out-interface}'[specify interface via which packet is to be sent]:*^!:interface:_net_interfaces' \ "($cmds -f --fragment)"{-f,--fragment}'[match second or further fragments only]' \ "($cmds -D --delete -c --set-counters)"{-c,--set-counters}'[initialise packet and byte counters]:packets: :bytes' \ '(-v --verbose)'{-v,--verbose}'[enable verbose output]' \ '(-w --wait)'{-w,--wait}'[specify maximum wait to acquire xtables lock before giving up]: :_numbers -u seconds -d 1 wait' \ - '(-W --wait-interval)'{-W,--wait-interval}'[specify wait time to try to acquire xtables lock]: :_numbers -u usecs -d "1 second" wait' \ '(-n --numeric)'{-n,--numeric}'[print IP addresses and port numbers in numeric format]' \ '(-x --exact)'{-x,--exact}'[expand numbers (display exact values)]' \ '--line-numbers[print line numbers when listing]' \ diff --git a/Completion/Linux/Command/_selinux b/Completion/Linux/Command/_selinux index a7ba68952..22d78db7d 100644 --- a/Completion/Linux/Command/_selinux +++ b/Completion/Linux/Command/_selinux @@ -1,4 +1,4 @@ -#compdef audit2allow audit2why avcstat chcon checkmodule checkpolicy fixfiles getpidprevcon getsebool matchpathcon newrole restorecon runcon sealert secon sedta seinfo selinuxconlist selinuxdefcon selinuxexeccon semanage semodule semodule_unpackage sepolgen sepolicy sesearch sestatus setenforce setsebool validatetrans +#compdef audit2allow audit2why avcstat chcon checkmodule checkpolicy fixfiles getpidprevcon getsebool matchpathcon newrole restorecon runcon sealert secon sedismod sedta seinfo selinuxconlist selinuxdefcon selinuxexeccon semanage semodule semodule_unpackage sepolgen sepolicy sesearch sestatus setenforce setsebool validatetrans # encompasses checkpolicy libselinux-utils policycoreutils # policycoreutils-devel policycoreutils-python-utils setools-console @@ -127,6 +127,7 @@ case $service in "${ign}(-h --help)"{-h,--help}'[display help information]' '(-U --handle-unknown)'{-U+,--handle-unknown=}'[specify how the kernel should handle unknown classes or permissions]:action:(deny allow reject)' '(-M --mls)'{-M,--mls}'[enable the MLS policy when checking and compiling the policy]' + '(-N --disable-neverallow)'{-N,--disable-neverallow}"[don't check neverallow rules]" '(-o --output)'{-o+,--output=}'[write a policy file]:file:_files' '-c+[specify the policy version]:policy version [latest]' ':input file:_files' @@ -154,7 +155,6 @@ case $service in '--perm-map=[specify file name of perm map]:file:_files' '--interface-info=[specify file name of interface information]:file:_files' '(-x --xperms)'{-x,--xperms}'[generate extended permission rules]' - '--debug[leave generated modules for -M]' '(-w --why)'{-w,--why}'[translate SELinux audit messages into a description of why the access was denied]' "${ign}(-h --help)"{-h,--help}'[display help information]' "${ign}--version[display version information]" @@ -193,7 +193,7 @@ case $service in ;; checkmodule) - args=( + args+=( "${ign}(-)"{-V,--version}'[show policy versions created by this program]' '-m[build a policy module instead of a base module]' '-c+[build a policy module targeting a modular policy version]:version (4-21)' @@ -201,7 +201,7 @@ case $service in ;; checkpolicy) - args=( + args+=( '(-F --conf)'{-F,--conf}'[write policy.conf file rather than binary policy file]' '(-d --debug)'{-d,--debug}'[enter debug mode after loading the policy]' '(-S --sort)'{-S,--sort}'[sort ocontexts before writing out the binary policy]' @@ -347,6 +347,10 @@ case $service in ) ;; + sedismod) + args=( ':pp file:_files -g "*.pp(-.)"' ) + ;; + sedta) args=( '(-p --policy)'{-p+,--policy=}'[specify path to SELinux policy to analyze]:policy:_files' @@ -410,7 +414,10 @@ case $service in selinuxdefcon) args=( + '-r+[specify role]:role' '-l+[specify mcs/mls level]:level' + '-s+[specify service]:service' + '-v[verbose output]' ':user:_users' ':context:_selinux_contexts' ) @@ -726,8 +733,6 @@ case $service in '--auditallowxperm[search auditallowxperm rules]' '--dontaudit[search dontaudit rules]' '--dontauditxperm[search dontauditxperm rules]' - '--neverallow[search neverallow rules]' - '--neverallowxperm[search neverallowxperm rules]' '(-T --type_trans)'{-T,--type_trans}'[search type_transition rules]' '--type_change[search type_change rules]' '--type_member[search type_member rules]' diff --git a/Completion/Linux/Command/_sshfs b/Completion/Linux/Command/_sshfs index 3467fbd8a..48b308066 100644 --- a/Completion/Linux/Command/_sshfs +++ b/Completion/Linux/Command/_sshfs @@ -15,12 +15,13 @@ _arguments -C -S : \ '(-d --debug -f)'{-d,--debug}'[enable debug output]' \ '-f[foreground]' \ '-s[disable multithreaded operation]' \ + '(-v --verbose)'{-v,--verbose}'[print ssh replies and messages]' \ ':remote directory:_user_at_host -S:' \ ':mountpoint:_files -/' && ret=0 if [[ $state == options ]]; then # TODO complete ssh(1) options - _values -s , "options to ssh, sshfs, mount, or FUSE" \ + _values -s , "option to ssh, sshfs, mount, or FUSE" \ 'port:number' \ 'compression: :(yes no)' \ reconnect delay_connect sshfs_sync no_readahead sync_readdir \ @@ -42,14 +43,15 @@ if [[ $state == options ]]; then 'ssh_protocol:version:(1 2)' \ sftp_server:path:_files \ directport:port:_ports \ - slave disable_hardlink transform_symlinks follow_symlinks no_check_root password_stdin \ - debug \ - allow_other allow_root auto_unmount nonempty default_permissions \ + passive disable_hardlink transform_symlinks follow_symlinks no_check_root password_stdin \ + max_conns:number \ + debug nonempty default_permissions \ fsname:filesystem\ name \ subtype:filesystem\ type \ large_read \ max_read:max\ size \ - hard_remove use_ino readdir_ino direct_io kernel_cache auto_cache noauto_cache \ + hard_remove use_ino readdir_ino direct_io \ + kernel_cache auto_cache noauto_cache \ 'umask:permissions' \ 'uid:owner' 'gid:group' \ 'entry_timeout:timeout (seconds) [1]' \ @@ -58,6 +60,7 @@ if [[ $state == options ]]; then 'ac_attr_timeout:timeout (seconds) [= attr_timeout]' \ noforget \ 'remember:time (seconds)' \ + allow_other allow_root auto_unmount \ nopath intr \ 'intr_signal:signal [10]' \ modules:module \ diff --git a/Completion/Linux/Command/_valgrind b/Completion/Linux/Command/_valgrind index 5eaaea338..6bf0e4450 100644 --- a/Completion/Linux/Command/_valgrind +++ b/Completion/Linux/Command/_valgrind @@ -40,7 +40,7 @@ common_report_errors=( '--error-exitcode=-[exit code to return if errors found]:exit code' \ '--error-markers=-[add lines with begin/end markers before/after]:markers (begin,end)' \ '(--show-error-list)-s[show detected errors list and suppression counts at exit]' \ - '--show-error-list=-[show detected errors list and suppression counts at exit]:enable [no]:(yes no)' + '--show-error-list=-[show detected errors list and suppression counts at exit]:enable [no]:(yes no all)' '--keep-debuginfo=-[keep symbols etc for unloaded code]:enable:(yes no)' \ '--show-below-main=-[continue stack traces below main()]:enable [no]:(yes no)' \ '--default-suppression=-[load default suppressions]:enable [yes]:(yes no)' \ @@ -115,6 +115,7 @@ args_memcheck=( $args_addrcheck $common_read_varinfo $common_report_errors + '--show-realloc-size-zero=-[show reallocs with a size of zero]:enable [yes]:(yes no)' ) args_cachegrind=( @@ -215,12 +216,13 @@ _arguments -C ${(P)args} $cmd \ '--child-silent-after-fork=-[omit child output between fork & exec]:enable:(yes no)' \ '--vgdb=-[activate gdbserver]:enable [yes]:(yes no full)' \ '--vgdb-error=-[invoke gdbserver after specified number of errors]:errors [999999999]:errors' \ - '--vgdb-stop-at=-[invoke gdbserver for given events]:event:_sequence compadd - startup exit valgrindabexit all none' \ + '--vgdb-stop-at=-[invoke gdbserver for given events]:event:_sequence compadd - startup exit abexit valgrindabexit all none' \ '--track-fds=-[track open file descriptors]:enable [no]:(yes no all)' \ '--time-stamp=-[add timestamps to log messages]:enable:(yes no)' \ '--log-fd=-[log messages to specified file descriptor]:file descriptor:_file_descriptors' \ '--log-file=-[log messages to specified file with pid appended]:file:_files' \ '--log-socket=-[log messages to socket]:ipaddr\:port' \ + '--enable-debuginfod=-[query debuginfod servers for missing debuginfo]:enable [yes]:(no yes)' \ '*--fullpath-after=-[show full source paths in call stacks]::prefix to remove from paths:_directories' \ '--extra-debuginfo-path=-[specify absolute path to search for additional debug symbols]:path:_directories' \ '--debuginfo-server=-[specify server to query for debug symbols]:server:_hosts' \ @@ -233,6 +235,7 @@ _arguments -C ${(P)args} $cmd \ '--run-libc-freeres=-[free up glibc memory at exit]:enable [yes]:(yes no)' \ '--run-cxx-freeres=-[free up libstdc++ memory at exit]:enable [yes]:(yes no)' \ '--sim-hints=-[activate unusual sim behaviours]:hint [none]:_sequence compadd - lax-ioctls lax-doors fuse-compatible enable-outer no-inner-prefix no-nptl-pthread-stackcache fallback-llsc none' \ + '--scheduling-quantum=-[thread-scheduling timeslice in number of basic blocks]:blocks [100000]' \ '--fair-sched=-[schedule threads fairly on multicore systems]:enable [no]:(yes no try)' \ '--kernel-variant=-[handle non-standard kernel variants]:kernel variant:_sequence compadd - bproc android-no-hw-tls android-gpu-sgx5xx android-gpu-adreno3xx' \ '--merge-recursive-frames=-[merge frames between identical program counters in specified max frames]:frames [0]' \ @@ -247,6 +250,7 @@ _arguments -C ${(P)args} $cmd \ '--unw-stack-scan-thresh=-[enable stack-scan unwind if fewer than specified number of good frames found]:frames' \ '--resync-filter=-[attempt to avoid expensive address-space-resync operations]:enable:(yes no verbose)' \ '--max-threads=-[specify maximum number of threads that valgrind can handle]:threads [500]' \ + '--realloc-zero-bytes-frees=-[should calls to realloc() with a size of 0 free memory and return NULL]:enable:(yes no)' \ && return typeset -a tools diff --git a/Completion/Unix/Command/_abcde b/Completion/Unix/Command/_abcde index 3f748d373..6b09d87b5 100644 --- a/Completion/Unix/Command/_abcde +++ b/Completion/Unix/Command/_abcde @@ -21,7 +21,7 @@ _arguments -s -S -A "-*" \ '-m[create DOS-style playlists, modifying the resulting one by adding CRLF line endings those to work]' \ "-n[don't query CDDB database]" \ '-N[non interactive mode]' \ - '-o+[select output type]:output type [vorbis]:(vorbis ogg mp3 flac spx mpc m4a wav wv ape opus mka aiff)' \ + '-o+[select output type]:output type [vorbis]:_sequence compadd - vorbis ogg mp3 flac spx mpc m4a wav wv ape opus mka aiff' \ "-p[pads track numbers with 0's]" \ '-P[use Unix PIPES to read and encode in one step]' \ '-Q+[specify CD lookup methods]:lookup method [musicbrainz]:_sequence compadd - musicbrainz cddb cdtext' \ diff --git a/Completion/Unix/Command/_dig b/Completion/Unix/Command/_dig index c09bebbe5..440c5de90 100644 --- a/Completion/Unix/Command/_dig +++ b/Completion/Unix/Command/_dig @@ -5,8 +5,8 @@ local -a alts args [[ -prefix + ]] && args=( '*+'{no,}'tcp[use TCP instead of UDP for queries]' '*+'{no,}'ignore[ignore truncation in UDP responses]' - '*+domain=[set search list to single domain]:domain:_hosts' - '!*+dscp=:code point (0..63)' + '*+domain=-[set search list to single domain]:domain:_hosts' + '!*+dscp=-:code point (0..63)' '*+'{no,}'search[use search list defined in resolv.conf]' '!*+'{no,}defname '*+'{no,}'showsearch[show intermediate results in domain search]' @@ -20,27 +20,26 @@ local -a alts args '*+'{no,}'cookie[add a COOKIE option to the request]' '*+'{no,}'crypto[display cryptographic fields in DNSSEC records]' '*+'{no,}'dns64prefix[get the DNS64 prefixes from ipv4only.arpa]' - '*+edns=[specify EDNS version for query]:version (0-255)' + '*+edns=-[specify EDNS version for query]:version (0-255)' '*+noedns[clear EDNS version to be sent]' - '*+ednsflags=[set EDNS flags bits]:flags' + '*+ednsflags=-[set EDNS flags bits]:flags' '*+'{no,}'ednsnegotiation[set EDNS version negotiation]' - '*+ednsopt=[specify EDNS option]:code point' + '*+ednsopt=-[specify EDNS option]:code point' '*+noedns[clear EDNS options to be sent]' '*+'{no,}'expandaaaa[expand AAAA records]' '*+'{no,}'expire[send an EDNS Expire option]' '*+'{no,}'header-only[send query without a question section]' - '*+'{no,}'https=[DNS-over-HTTPS POST mode]::endpoint [/dns-query]' - '!*+'{no,}'https-post=::endpoint [/dns-query]' - '*+'{no,}'https-get=[DNS-over-HTTPS GET mode]::endpoint [/dns-query]' - '*+'{no,}'http-plain=[DNS-over-HTTP POST mode]::endpoint [/dns-query]' - '*+'{no,}'http-plain-get=[DNS-over-HTTP GET mode]::endpoint [/dns-query]' - '*+'{no,}'idnin[set processing of IDN domain names on input]' - '*+'{no,}'idnout[set conversion of IDN puny code on output]' + '*+'{no,}'https=-[DNS-over-HTTPS POST mode]::endpoint [/dns-query]' + '!*+'{no,}'https-post=-::endpoint [/dns-query]' + '*+'{no,}'https-get=-[DNS-over-HTTPS GET mode]::endpoint [/dns-query]' + '*+'{no,}'http-plain=-[DNS-over-HTTP POST mode]::endpoint [/dns-query]' + '*+'{no,}'http-plain-get=-[DNS-over-HTTP GET mode]::endpoint [/dns-query]' + '*+'{no,}'idn[convert international domain names]' '*+'{no,}'keepalive[request EDNS TCP keepalive]' '*+'{no,}'keepopen[keep TCP socket open between queries]' '*+'{no,}'recurse[set the RD (recursion desired) bit in the query]' '*+'{no,}'nssearch[search all authoritative nameservers]' - '*+opcode[set DNS message opcode of the request]:opcode [QUERY]:(QUERY IQUERY STATUS NOTIFY UPDATE)' + '*+opcode=-[set DNS message opcode of the request]:opcode [QUERY]:(QUERY IQUERY STATUS NOTIFY UPDATE)' '*+noopcode[clear DNS message opcode]' '*+'{no,}'trace[trace delegation down from root]' '*+'{no,}'cmd[print initial comment in output]' @@ -50,7 +49,9 @@ local -a alts args '*+'{no,}'comments[print comment lines in output]' '*+'{no,}'stats[print statistics]' '*+padding[set padding block size]:size [0]' - '*+qid=[specify query ID]:query ID' + '*+'{no,}'proxy=-[add PROXYv2 headers to queries]:src_addr[#src_port]-dst_addr[#dst_port]' + '*+'{no,}'proxy-plain=-[add PROXYv2 headers to queries ahead of any encryption]:src_addr[#src_port]-dst_addr[#dst_port]' + '*+qid=-[specify query ID]:query ID' '*+'{no,}'qr[print query as it was sent]' '*+'{no,}'question[print question section of a query]' '*+'{no,}'raflag[set RA flag in the query]' @@ -59,17 +60,17 @@ local -a alts args '*+'{no,}'all[set all print/display flags]' '*+'{no,}'subnet[send EDNS client subnet option]:addr/prefix-length' '*+'{no,}'tcflag[set TC flag in the query]' - '*+timeout=[set query timeout]:timeout (seconds) [5]' + '*+timeout=-[set query timeout]:timeout (seconds) [5]' '*+'{no,}'tls[DNS-over-TLS mode]' - '*+'{no,}"tls-ca=[enable remote server's TLS certificate validation]:file:_files" - '*+'{no,}"tls-hostname=[explicitly set the expected TLS hostname]:hostname" - '*+'{no,}'tls-certfile=[load client TLS certificate chain from file]:file:_files' - '*+'{no,}'tls-keyfile=[load client TLS private key from file]:file:_files' - '*+tries=[specify number of UDP query attempts]:tries' - '*+retry=[specify number of UDP query retries]:retries' + '*+'{no,}"tls-ca=-[enable remote server's TLS certificate validation]:file:_files" + '*+'{no,}"tls-hostname=-[explicitly set the expected TLS hostname]:hostname" + '*+'{no,}'tls-certfile=-[load client TLS certificate chain from file]:file:_files' + '*+'{no,}'tls-keyfile=-[load client TLS private key from file]:file:_files' + '*+tries=-[specify number of UDP query attempts]:tries' + '*+retry=-[specify number of UDP query retries]:retries' '*+'{no,}'rrcomments[set display of per-record comments]' - '*+ndots=[specify number of dots to be considered absolute]:dots' - '*+bufsize=[specify UDP buffer size]:size (bytes)' + '*+ndots=-[specify number of dots to be considered absolute]:dots' + '*+bufsize=-[specify UDP buffer size]:size (bytes)' '*+'{no,}'multiline[verbose multi-line output]' '*+'{no,}'onesoa[AXFR prints only one soa record]' '*+'{no,}"fail[don't try next server on SERVFAIL]" diff --git a/Completion/Unix/Command/_flac b/Completion/Unix/Command/_flac index 1773061ee..0197aaf92 100644 --- a/Completion/Unix/Command/_flac +++ b/Completion/Unix/Command/_flac @@ -14,9 +14,11 @@ shortops=( --show-total-samples --show-vendor-tag '--show-tag=:FLAC tag' + '--show-all-tags' '--remove-tag=:FLAC tag' '--remove-first-tag=:FLAC tag' --remove-all-tags + '--remove-all-tags-except=:tag' '*--set-tag=:FLAC tag and value: ' '*--set-tag-from-file=:tag' '--import-tags-from=:flat file:_files' @@ -60,7 +62,7 @@ case $service in '(H)--until=[stop at specified sample for each input]:stop (+-mm:ss.ss)' \ '(H)--ogg[use ogg as a transport layer]' \ '(H)--serial-number=[serial number to use for the FLAC stream]:serial number' \ - '(H --force-aiff-format --force-rf64-format --force-wave64-format)--format-raw-format' \ + '(H --force-aiff-format --force-rf64-format --force-wave64-format --force-legacy-wave-format --force-extensible-wave-format --force-aiff-c-none-format --force-aiff-c-sowt-format)--force-raw-format' \ '*:file:_files -F line -g "(#i)*.(${${opt_args[(i)decode-*]:+flac|oga}:-wav|aif|aiff|raw|rf64|w64})(-.)"' \ - 'H' \ '(-)'{-v,--version}'[display version information]' \ @@ -100,9 +102,13 @@ case $service in '(-F --decode-through-errors)'{-F,--decode-through-errors}'[continue decoding through stream errors]' \ '--apply-replaygain-which-is-not-lossless=:specification' \ '--cue=[set the beginning and ending cuepoints to decode]:cue point' \ - '(--force-raw-format --force-rf64-format --force-wave64-format)--force-aiff-format' \ - '(--force-raw-format --force-aiff-format --force-wave64-format)--force-rf64-format' \ - '(--force-raw-format --force-aiff-format --force-rf64-format)--force-wave64-format' \ + '(--force-raw-format --force-rf64-format --force-wave64-format --force-legacy-wave-format --force-extensible-wave-format --force-aiff-c-none-format --force-aiff-c-sowt-format)--force-aiff-format' \ + '(--force-raw-format --force-aiff-format --force-wave64-format --force-legacy-wave-format --force-extensible-wave-format --force-aiff-c-none-format --force-aiff-c-sowt-format)--force-rf64-format' \ + '(--force-raw-format --force-aiff-format --force-rf64-format --force-legacy-wave-format --force-extensible-wave-format --force-aiff-c-none-format --force-aiff-c-sowt-format)--force-wave64-format' \ + '(--force-raw-format --force-aiff-format --force-rf64-format --force-wave64-format --force-extensible-wave-format --force-aiff-c-none-format --force-aiff-c-sowt-format)--force-legacy-wave-format' \ + '(--force-raw-format --force-aiff-format --force-rf64-format --force-wave64-format --force-legacy-wave-format --force-aiff-c-none-format --force-aiff-c-sowt-format)--force-extensible-wave-format' \ + '(--force-raw-format --force-aiff-format --force-rf64-format --force-wave64-format --force-legacy-wave-format --force-extensible-wave-format --force-aiff-c-sowt-format)--force-aiff-c-none-format' \ + '(--force-raw-format --force-aiff-format --force-rf64-format --force-wave64-format --force-legacy-wave-format --force-extensible-wave-format --force-aiff-c-none-format)--force-aiff-c-sowt-format' ;; metaflac) _arguments -S $shared \ @@ -112,10 +118,11 @@ case $service in "*:FLAC file:_files -g \*.flac\(-.\)" \ - 'short' $shortops \ - 'list' $common --list \ + '--data-format=:format:(binary binary-headerless text)' \ '--application-data-format=:format:(text hexdump)' \ - 'remove' $common --remove \ - '(ops)' \ '(-)--help' '(-)--version' \ - --remove-all --merge-padding --sort-padding + --append --remove-all --merge-padding --sort-padding ;; esac diff --git a/Completion/Unix/Command/_gnutls b/Completion/Unix/Command/_gnutls index 9b8bcf6ea..4c1698857 100644 --- a/Completion/Unix/Command/_gnutls +++ b/Completion/Unix/Command/_gnutls @@ -24,6 +24,7 @@ case "$service" in gnutls-cli*) args+=( '(--app-proto --starttls-proto)'{--app-proto,--starttls-proto}"=[specify application protocol to use to obtain the server's certificate]:protocol:(https ftp smtp imap ldap xmpp lmtp pop3 nntp sieve postgres)" + '(-s --starttls)--starttls-name=[specify hostname presented to the application protocol for STARTTLS]:hostname' ':hostname:_hosts' ) ;| @@ -99,7 +100,7 @@ case "$service" in '--post-handshake-auth[enable post-handshake authentication under TLS1.3]' '--inline-commands[inline commands of the form ^^]' '--inline-commands-prefix=[change delimiter used for inline commands]:delimiter [^]' - '--fips140-mode[report status of FIPS140-3 mode in gnutls library]' + '--fips140-mode[report status of FIPS140-2 mode in gnutls library]' '--list-config[report configuration of the library]' '--logfile=[redirect informational messages to a specific file]:file:_files' '--waitresumption[block waiting for the resumption data under TLS1.3]' @@ -202,9 +203,11 @@ case "$service" in '--seed=[when generating a private key use the given seed]:seed (hex-encoded)' '--pubkey-info[print information on a public key]' '--to-p12[generate a PKCS #12 structure]' + '--pbmac1[use PBMAC1 in a PKCS #12 structure]' '(-8 --pkcs8)'{-8,--pkcs8}'[use PKCS #8 format for private keys]' '--hash=[specify hash algorithm for signing]:algorithm:(MD5 SHA1 RMD160)' '--salt-size=[specify the RSA-PSS key default salt size]:size' + '--label=[specify the RSA-OAEP label, encoded in hexadecimal]:label' {--inder,--inraw}'[use DER format for input certificates and private keys]' {--outder,--outraw}'[use DER format for output certificates and private keys]' '--template=[specify template file to use for non-interactive operation]:file:_files' diff --git a/Completion/Unix/Command/_jq b/Completion/Unix/Command/_jq index b8e41dd66..e8e6b0913 100644 --- a/Completion/Unix/Command/_jq +++ b/Completion/Unix/Command/_jq @@ -1,6 +1,7 @@ #compdef jq -# last updated for jq-1.5-1-a5b5cbe (debian package 1.5+dfsg-1.3) +local ign +(( $#words > 2 )) && ign='!' # Note: # Arguments to options must be in separate words. Thus, @@ -8,23 +9,27 @@ # is correct like that, without the usual {-f+,--from-file=} suffixes. # _arguments -S -s : \ - "--version[output jq's version number]" \ + "${ign}(- 1 *)"{-V,--version}'[display version information]' \ + "${ign}(- 1 *)"{-h,--help}'[display help information]' \ + "${ign}(- 1 *)--build-configuration[display jq's build configuration]" \ "--seq[use application/json-seq ASCII RS/LF scheme in input and output]" \ - "--stream[parse input streamily (changes output)]" \ - '(-s --slurp)'{-s,--slurp}'[join input JSON objects to array before filtering]' \ - '(-R --raw-input)'{-R,--raw-input}'[consider each input line as a JSON strings]' \ - '(-n --null-input)'{-n,--null-input}'[input is ignored]' \ + "(--stream-errors -n --null-input)--stream[parse the input value in streaming fashion]" \ + '(--stream -n --null-input)--stream-errors[parse the input value in streaming fashion with errors as an array]' \ + '(-s --slurp -n --null-input)'{-s,--slurp}'[read all inputs into an array and use it as single input value]' \ + '(-R --raw-input -n --null-input)'{-R,--raw-input}'[read each line as string instead of JSON]' \ + '(-n --null-input --stream --stream-errors -s --slurp -R --raw-input)'{-n,--null-input}'[use `null` as the single input value]' \ '(-c --compact-output)'{-c,--compact-output}"[don't pretty-print]" \ '(--indent)--tab[indent output using TAB characters]' \ - '(--tab)--indent[indent output using given number of spaces]:number of spaces (integer):(2 4 8)' \ + '(--tab)--indent[indent output using given number of spaces]:number of spaces (integer):(-1 0 1 2 3 4 5 6 7)' \ '(-C --color-output -M --monochrome-output)'{-C,--color-output}'[output in color]' \ '(-C --color-output -M --monochrome-output)'{-M,--monochrome-output}'[output without color]' \ - '(-a --ascii-output)'{-a,--ascii-output}'[restrict output to ASCII]' \ + '(-a --ascii-output)'{-a,--ascii-output}'[restrict output to ASCII using escape sequences]' \ '--unbuffered[flush output after each JSON object]' \ '(-S --sort-keys)'{-S,--sort-keys}'[output object keys in sorted order]' \ - '(-r --raw-output -j --join-output)'{-r,--raw-output}"[don't JSON-quote output if it's a string]" \ - '(-r --raw-output -j --join-output)'{-j,--join-output}"[like -r, without newlines between outputs]" \ - '(-f --from-file)'{-f,--from-file}'[read filter from file]:_files' \ + '(-r --raw-output -j --join-output --raw-output0)'{-r,--raw-output}"[don't JSON-quote output if it's a string]" \ + '(-r --raw-output -j --join-output)--raw-output0[like -r, with NUL after each output]' \ + '(-r --raw-output --raw-output0 -j --join-output)'{-j,--join-output}"[like -r, without newlines between outputs]" \ + '(-f --from-file)'{-f,--from-file}'[read filter from file]: :_files' \ '-L+[prepend a directory to the module search path]:_directories' \ '(-e --exit-status)'{-e,--exit-status}'[report "false" and "null" results via exit code]' \ '*--arg[pre-set a variable to a string]:variable name: :value (string)' \ diff --git a/Completion/Unix/Command/_pv b/Completion/Unix/Command/_pv index b21625650..0e1f148d5 100644 --- a/Completion/Unix/Command/_pv +++ b/Completion/Unix/Command/_pv @@ -20,6 +20,7 @@ _arguments -s -S $args \ '(-m --average-rate-window)'{-m+,--average-rate-window=}'[compute average rate over period]:duration (seconds) [30]' \ '(-b --bytes -8 --bits -F --format)'{-b,--bytes}'[show number of bytes transferred]' \ '(-8 --bits -b --bytes -F --format)'{-8,--bits}'[show number of bits transferred]' \ + '(-k --si)'{-k,--si}'[treat suffixes as multiples of 1000 rather than 1024]' \ '(-T --buffer-percent -F --format)'{-T,--buffer-percent}'[show percentage of transfer buffer in use]' \ '(-A --last-written -F --format)'{-A+,--last-written=}'[show number of bytes last written]:number (bytes)' \ '(-F --format -p --progress -t --timer -e --eta -I --fineta -r --rate -a --average-rate -b --bytes -T --buffer-percent -A --last-written -F --format)'{-F+,--format=}'[set output format]:format:->formats' \ @@ -28,19 +29,29 @@ _arguments -s -S $args \ '(-W --wait)'{-W,--wait}'[display nothing until first byte transferred]' \ '(-D --delay-start -R --remote)'{-D+,--delay-start=}'[display nothing until delay has passed]:delay (seconds)' \ '(-s --size)'{-s+,--size=}'[set estimated data size]: :_numbers -u bytes size K M G T' \ + '(-g --gauge)'{-g,--gauge}'[if size unknown, show rate vs max rate]' \ '(-l --line-mode -R --remote)'{-l,--line-mode}'[count lines instead of bytes]' \ '(-0 --null -l --line-mode)'{-0,--null}'[lines are null-terminated]' \ '(-i --interval)'{-i+,--interval=}'[update every after specified interval]:interval (seconds) [1]' \ + '(-m --average-rate-window)'{-m,--average-rate-window}'[compute average rate over past period]:period (seconds) [30]' \ '(-w --width)'{-w+,--width}'[assume terminal is specified characters wide]:width' \ '(-H --height)'{-H+,--height=}'[assume terminal is specified rows high]:height' \ '(-N --name)'{-N+,--name=}'[prefix visual information with given name]:name' \ + '(-x --extra-display)'{-x+,--extra-display=}'[also send progress to destination]:destination:_sequence - compadd windowtitle processtitle' \ + '(-v --stats)'{-v,--stats}'[output transfer statistics at the end]' \ '(-f --force -R --remote)'{-f,--force}'[output even if standard error is not a terminal]' \ '(-c --cursor -R --remote)'{-c,--cursor}'[use cursor positioning escape sequences]' \ + '(-o --output)'{-o+,--output=}'[write output to file instead of stdout]:file:_files' \ '(-L --rate-limit)'{-L+,--rate-limit=}'[limit transfer rate]: :_numbers -u "bytes per second" rate K M G T' \ '(-B --buffer-size)'{-B+,--buffer-size=}'[use a buffer size of given size]: :_numbers -u bytes size K M G T' \ '(-C --no-splice)'{-C,--no-splice}'[never use splice(), always use read/write]' \ '(-R --remote)*'{-E,--skip-errors}"[skip read errors in input${Edesc}]" \ + '(-Z --error-skip-block)'{-Z+,--error-skip-block=}'[skip whole blocks on errors]: :_numbers -u bytes "block size" K M G T' \ '(-S --stop-at-size -R --remote)'{-S,--stop-at-size}'[stop after --size bytes have been transferred]' \ + '(-Y --sync)'{-Y,--sync}'[flush cache to disk after every write]' \ + '(-K --direct-io)'{-K,--direct-io}'[use direct I/O to bypass cache]' \ + '(-X --discard)'{-X,--discard}'[discard input instead of writing to output]' \ + '(-U --store-and-forward)'{-U+,--store-and-forward=}'[write all input to file before writing to output]:file:_files' \ '(-R --remote -c --cursor -l --line-mode -f --force -D --delay-start -E --skip-errors -S --stop-at-size)'{-R+,--remote=}'[update settings of specified process]:process:_pids -m pv' \ '(-P --pidfile)'{-P+,--pidfile=}'[save process id in a file]:file:_files' \ "${ign}(- *)"{-h,--help}'[display usage information]' \ diff --git a/Completion/Unix/Command/_sqlite b/Completion/Unix/Command/_sqlite index 6f0b1de94..a83624083 100644 --- a/Completion/Unix/Command/_sqlite +++ b/Completion/Unix/Command/_sqlite @@ -56,6 +56,7 @@ options+=( $^dashes'-newline[set output row separator]:separator [\n]' $^dashes'-nofollow[refuse to open symbolic links to database files]' $^dashes'-nonce[set the safe-mode escape nonce]:string' + $^dashes'-no-rowid-in-view[disable rowid-in-view using sqlite3_config()]' $^dashes'-pagecache[specify size and number of slots for page cache memory]:size (bytes): :slots' $^dashes'-pcachetrace[trace all page cache operations]' $^dashes'-readonly[open the database read-only]' @@ -63,6 +64,7 @@ options+=( $^dashes'-stats[print memory stats before each finalize]' $^dashes'-unsafe-testing[allow unsafe commands and modes for testing]' $^dashes'-vfs[use specified default VFS]:vfs:(unix-dotfile unix-excl unix-none unix-namedsem)' + $^dashes'-vfstrace[enable tracing of all VFS calls]' $^dashes'-zip[open the file as a ZIP Archive]' ) diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh index 5e6e60573..d8c27c65f 100644 --- a/Completion/Unix/Command/_ssh +++ b/Completion/Unix/Command/_ssh @@ -62,7 +62,7 @@ _ssh () { '(-v)*-q[quiet operation]' \ '*-R+[specify remote port forwarding]:remote port forwarding:->forward' \ '-S+[specify location of control socket for connection sharing]:path to control socket:_files' \ - '-Q+[query parameters]:query option:((cipher\:"supported symmetric ciphers" cipher-auth\:"supported symmetric ciphers that support authenticated encryption" compression mac\:"supported message integrity codes" kex\:"key exchange algorithms" kex-gss\:"GSSAPI key exchange algorithms" key\:"key types" key-cert\:"certificate key types" key-plain\:"non-certificate key types" key-sig\:"all key types and signature algorithms" protocol-version\:"supported SSH protocol versions" sig\:"supported signature algorithms" help\:"show supported queries" HostbasedAcceptedAlgorithms HostKeyAlgorithms KexAlgorithms MACs PubkeyAcceptedAlgorithms))' \ + '(- 1 *)-Q+[query parameters]:query option:((cipher\:"supported symmetric ciphers" cipher-auth\:"supported symmetric ciphers that support authenticated encryption" compression mac\:"supported message integrity codes" kex\:"key exchange algorithms" kex-gss\:"GSSAPI key exchange algorithms" key\:"key types" key-cert\:"certificate key types" key-plain\:"non-certificate key types" key-sig\:"all key types and signature algorithms" protocol-version\:"supported SSH protocol versions" sig\:"supported signature algorithms" help\:"show supported queries" HostbasedAcceptedAlgorithms HostKeyAlgorithms KexAlgorithms MACs PubkeyAcceptedAlgorithms))' \ '-s[invoke subsystem]' \ '(-t)-T[disable pseudo-tty allocation]' \ "(-T)*-t[force pseudo-tty allocation${tdesc}]" \ @@ -280,6 +280,7 @@ _ssh () { '-O+[specify a key/value option]: : _values option "hashalg[select a hash algorithm to use with -D]\:algorithm [both]\:(sha1 sha256)"' \ '-p+[specify port on remote host]:port number on remote host' \ + "-q[don't print server host name and banners in comments]" \ '-T+[specify timeout]: :_numbers -u seconds -d 5 timeout \:s\:seconds m\:minutes h\:hours d\:days w\:weeks' \ '-t+[specify key types to fetch from scanned hosts]:key type:_sequence compadd - rsa dsa ecdsa ed25519' \ '-v[verbose mode]' @@ -300,9 +301,13 @@ _ssh () { _arguments \ '-i+[select identity file]:SSH identity file:_files -g "*(-.^AR)"' \ '-f[copy keys without trying to check if they are already installed]' \ + '-F+[specify alternate config file]:config file:_files' \ '-n[dry run - no keys are actually copied]' \ '*-o+[specify ssh options]:option string:->option' \ '-p+[specify port on remote host]:port number on remote host' \ + '-s[upload public keys with sftp]' \ + '-t+[specify path on target system]:path [.ssh/authorized_keys]' \ + '-x[debug script by turning on command tracing]' \ '(- 1)'{-h,-\?}'[display usage information]' \ ':remote host name:->userhost' && ret=0 ;; @@ -359,6 +364,10 @@ _ssh () { (#i)canonicalizepermittedcnames=*) _message -e 'CNAME rule list (source_domain_list:target_domain_list, each pattern list comma separated)' && ret=0 ;; + (#i)channeltimeout=*) + _values 'channel type' \ + {agent-connection,direct-tcpip,forwarded-tcpip,session,tun-connection,x11-connection}:interval:'_numbers -u seconds timeout :s:seconds m:minutes h:hours d:days w:weeks' && ret=0 + ;; (#i)ciphers=*) state=ciphers ;; @@ -584,6 +593,7 @@ _ssh () { CanonicalizePermittedCNAMEs \ CASignatureAlgorithms \ CertificateFile \ + ChannelTimeout \ CheckHostIP \ Ciphers \ ClearAllForwardings \ diff --git a/Completion/X/Command/_zeal b/Completion/X/Command/_zeal index 334331d40..024b8c381 100644 --- a/Completion/X/Command/_zeal +++ b/Completion/X/Command/_zeal @@ -8,6 +8,7 @@ _arguments -S \ ':query:->queries' \ + '(opt)' \ {-h,--help}'[display help information]' \ + --help-all'[display help, including generic Qt options]' \ {-v,--version}'[display version information]' \ {-f,--force}'[force the application to run]' && ret=0 -- cgit v1.2.3