mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-10 12:40:58 +02:00
41431: update options in assorted completions
This commit is contained in:
parent
4a63a1793a
commit
8eaacb3541
11 changed files with 70 additions and 23 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2017-07-15 Oliver Kiddle <opk@zsh.org>
|
||||||
|
|
||||||
|
* 41431: Completion/Linux/Command/_lsblk,
|
||||||
|
Completion/Linux/Command/_ss, Completion/Linux/Command/_strace,
|
||||||
|
Completion/Unix/Command/_diffstat, Completion/Unix/Command/_dig,
|
||||||
|
Completion/Unix/Command/_dmidecode, Completion/Unix/Command/_irssi,
|
||||||
|
Completion/Unix/Command/_gsettings, Completion/Unix/Command/_ssh,
|
||||||
|
Completion/X/Command/_xclip: update options in assorted completions
|
||||||
|
|
||||||
2017-07-14 Oliver Kiddle <opk@zsh.org>
|
2017-07-14 Oliver Kiddle <opk@zsh.org>
|
||||||
|
|
||||||
* Fabian Klötzl: 41414: Completion/Linux/Command/_iptables,
|
* Fabian Klötzl: 41414: Completion/Linux/Command/_iptables,
|
||||||
|
|
|
@ -18,6 +18,7 @@ _arguments -C -s -S \
|
||||||
'*:device:_files -g "*(-%b)" -P / -W /' \
|
'*:device:_files -g "*(-%b)" -P / -W /' \
|
||||||
+ fields \
|
+ fields \
|
||||||
'(H -D --discard -o --output -O --output-all)'{-D,--discard}'[output discard capabilities]' \
|
'(H -D --discard -o --output -O --output-all)'{-D,--discard}'[output discard capabilities]' \
|
||||||
|
'(H -z --zoned -o --output -O --output-all)'{-z,--zoned}'[output zone model]' \
|
||||||
'(H -f --fs -o --output -O --output-all)'{-f,--fs}'[output info about filesystems]' \
|
'(H -f --fs -o --output -O --output-all)'{-f,--fs}'[output info about filesystems]' \
|
||||||
'(H -m --perms -o --output -O --output-all)'{-m,--perms}'[output info about permissions]' \
|
'(H -m --perms -o --output -O --output-all)'{-m,--perms}'[output info about permissions]' \
|
||||||
'(H -S --scsi -o --output -O --output-all)'{-S,--scsi}'[output info about SCSI devices]' \
|
'(H -S --scsi -o --output -O --output-all)'{-S,--scsi}'[output info about SCSI devices]' \
|
||||||
|
|
|
@ -28,6 +28,7 @@ _arguments -C -s \
|
||||||
"($info -4 --ipv4 -6 --ipv6)"{-6,--ipv6}'[display only IP version 6 sockets]' \
|
"($info -4 --ipv4 -6 --ipv6)"{-6,--ipv6}'[display only IP version 6 sockets]' \
|
||||||
"($info -0 --packet)"{-0,--packet}'[display PACKET sockets]' \
|
"($info -0 --packet)"{-0,--packet}'[display PACKET sockets]' \
|
||||||
"($info -t --tcp)"{-t,--tcp}'[display TCP sockets]' \
|
"($info -t --tcp)"{-t,--tcp}'[display TCP sockets]' \
|
||||||
|
"($info -S --sctp)"{-S,--sctp}'[display SCTP sockets]' \
|
||||||
"($info -u --udp)"{-u,--udp}'[display UDP sockets]' \
|
"($info -u --udp)"{-u,--udp}'[display UDP sockets]' \
|
||||||
"($info -d --dccp)"{-d,--dccp}'[display DCCP sockets]' \
|
"($info -d --dccp)"{-d,--dccp}'[display DCCP sockets]' \
|
||||||
"($info -w --raw)"{-w,--raw}'[display RAW sockets]' \
|
"($info -w --raw)"{-w,--raw}'[display RAW sockets]' \
|
||||||
|
|
|
@ -53,7 +53,8 @@ case $state in
|
||||||
'raw[print raw, undecoded arguments for the specified set of system calls]:system call:_sequence _sys_calls -a -n' \
|
'raw[print raw, undecoded arguments for the specified set of system calls]:system call:_sequence _sys_calls -a -n' \
|
||||||
'signal[trace only the specified subset of signals]:signal:_sequence _signals -s -M "B\:!="' \
|
'signal[trace only the specified subset of signals]:signal:_sequence _signals -s -M "B\:!="' \
|
||||||
'read[perform a full hex and ASCII dump of all the data read from listed file descriptors]:file descriptor:_sequence _file_descriptors' \
|
'read[perform a full hex and ASCII dump of all the data read from listed file descriptors]:file descriptor:_sequence _file_descriptors' \
|
||||||
'write[perform a full hex and ASCII dump of all the data written to listed file descriptors]:file descriptor:_sequence _file_descriptors' && ret=0
|
'write[perform a full hex and ASCII dump of all the data written to listed file descriptors]:file descriptor:_sequence _file_descriptors' \
|
||||||
|
'fault[perform syscall fault injection]:system call:_sys_calls -a -n' && ret=0
|
||||||
if [[ $words[CURRENT] != *=* || $state = syscalls ]]; then
|
if [[ $words[CURRENT] != *=* || $state = syscalls ]]; then
|
||||||
local dedup sets suf="-qS,"
|
local dedup sets suf="-qS,"
|
||||||
compset -P '!'
|
compset -P '!'
|
||||||
|
|
|
@ -1,19 +1,32 @@
|
||||||
#compdef diffstat
|
#compdef diffstat
|
||||||
|
|
||||||
_arguments \
|
_arguments -s -S \
|
||||||
|
'-b[ignore lines indicating binary file differences]' \
|
||||||
'-c[prefix each line with hash mark]' \
|
'-c[prefix each line with hash mark]' \
|
||||||
'-e:error file:_files' \
|
'-C[use color highlighting of histogram]' \
|
||||||
'-f:histogram format:((0\:concise 1\:normal 2\:dots 3\:dots+normal 4\:value 5\:value+normal 6\:value+dots 7\:value+dots+normal))' \
|
'-d[print debug information]' \
|
||||||
'-h[help]' \
|
'-D[specify location of patched files for unchanged count]:location:_directories' \
|
||||||
|
'-e[redirect standard error to specified file]:error file:_files' \
|
||||||
|
'-E[trim escape sequences, e.g. from colordiff]' \
|
||||||
|
'-f[specify histogram format]:format:((0\:concise 1\:normal 2\:dots 3\:dots+normal 4\:value 5\:value+normal 6\:value+dots 7\:value+dots+normal))' \
|
||||||
|
'(- *)-h[display help information]' \
|
||||||
'-k[suppress merging of filenames in report]' \
|
'-k[suppress merging of filenames in report]' \
|
||||||
|
'-K[resolve ambiguity of "only" filenames]' \
|
||||||
'-l[list only the filenames]' \
|
'-l[list only the filenames]' \
|
||||||
'-n:minimum width for filenames:' \
|
'-m[merge insert/delete data in chunks as modified-lines]' \
|
||||||
'-o:output file:_files' \
|
'-n[specify minimum width for filenames]:width [auto]' \
|
||||||
'-p:number of path components:' \
|
'-N[specify maximum width for filenames]:width [auto]' \
|
||||||
'-f:rounding code:((0\:none 1\:round 2\:round+adjustment))' \
|
'-o[redirect standard output to specified file]:output file:_files' \
|
||||||
'-t[overrides histogram, generates csv output]' \
|
'-p[specify number of path separators to strip]:path components [common]' \
|
||||||
|
'-q[suppress "0 files changed" message for empty diffs]' \
|
||||||
|
'-r[specify rounding for histogram]:rounding:((0\:none 1\:simple 2\:simple+adjustment))' \
|
||||||
|
'(-t)-s[show only the summary line]' \
|
||||||
|
'-S[specify location of original files for unchanged count]:location:_directories' \
|
||||||
|
'-R[assume patch was created with old and new files swapped]' \
|
||||||
|
'(-T -s)-t[overrides histogram, generates csv output]' \
|
||||||
|
'(-t)-T[print amounts (like -t) in addition to histogram]' \
|
||||||
'-u[suppress sorting of filenames in report]' \
|
'-u[suppress sorting of filenames in report]' \
|
||||||
'-v[show progress]' \
|
'-v[show progress]' \
|
||||||
'-V[print version number]' \
|
'(- *)-V[print version number]' \
|
||||||
'-w:maximum width of histogram:' \
|
'-w[specify maximumn width of output]:maximum width [80]' \
|
||||||
'*:file specifications:_files'
|
'*:patch file:_files'
|
||||||
|
|
|
@ -15,15 +15,33 @@ local -a alts args
|
||||||
'*+'{no,}'tcp[use TCP instead of UDP for queries]'
|
'*+'{no,}'tcp[use TCP instead of UDP for queries]'
|
||||||
'*+'{no,}'ignore[ignore truncation in UDP responses]'
|
'*+'{no,}'ignore[ignore truncation in UDP responses]'
|
||||||
'*+domain=[set search list to single domain]:domain:_hosts'
|
'*+domain=[set search list to single domain]:domain:_hosts'
|
||||||
|
'*+dscp=[set DSCP code point for query]:code point (0..63)'
|
||||||
'*+'{no,}'search[use search list defined in resolv.conf]'
|
'*+'{no,}'search[use search list defined in resolv.conf]'
|
||||||
'*+'{no,}'showsearch[show intermediate results in domain search]'
|
'*+'{no,}'showsearch[show intermediate results in domain search]'
|
||||||
|
'*+split[split hex/base64 fields into chunks]:width (characters) [56]'
|
||||||
'*+'{no,}'aaonly[set aa flag in the query]'
|
'*+'{no,}'aaonly[set aa flag in the query]'
|
||||||
|
'*+'{no,}'additional[print additional section of a reply]'
|
||||||
'*+'{no,}'adflag[set the AD (authentic data) bit in the query]'
|
'*+'{no,}'adflag[set the AD (authentic data) bit in the query]'
|
||||||
|
'*+'{no,}'badcookie[retry BADCOOKIE responses]'
|
||||||
'*+'{no,}'cdflag[set the CD (checking disabled) bit in the query]'
|
'*+'{no,}'cdflag[set the CD (checking disabled) bit in the query]'
|
||||||
'*+'{no,}'cl[display the CLASS whening printing the record]'
|
'*+'{no,}'class[display the CLASS whening printing the record]'
|
||||||
'*+'{no,}'ttlid[display the TTL whening printing the record]'
|
'*+'{no,}'cookie[add a COOKIE option to the request]'
|
||||||
|
'*+'{no,}'crypto[display cryptographic fields in DNSSEC records]'
|
||||||
|
'*+edns=[specify EDNS version for query]:version (0-255)'
|
||||||
|
'*+noedns[clear EDNS version to be sent]'
|
||||||
|
'*+ednsflags=[set EDNS flags bits]:flags'
|
||||||
|
'*+'{no,}'ednsnegotiation[set EDNS version negotiation]'
|
||||||
|
'*+ednsopt=[specify EDNS option]:code point'
|
||||||
|
'*+noedns[clear EDNS options to be sent]'
|
||||||
|
'*+'{no,}'expire[send an EDNS Expire option]'
|
||||||
|
'*+'{no,}'header-only[send query without a question section]'
|
||||||
|
'*+'{no,}'idnout[set conversion of IDN puny code on output]'
|
||||||
|
'*+'{no,}'keepopen[keep TCP socket open between queries]'
|
||||||
|
'*+'{no,}'mapped[allow mapped IPv4 over IPv6 to be used]'
|
||||||
'*+'{no,}'recurse[set the RD (recursion desired) bit in the query]'
|
'*+'{no,}'recurse[set the RD (recursion desired) bit in the query]'
|
||||||
'*+'{no,}'nssearch[search all authoritative nameservers]'
|
'*+'{no,}'nssearch[search all authoritative nameservers]'
|
||||||
|
'*+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,}'trace[trace delegation down from root]'
|
||||||
'*+'{no,}'cmd[print initial comment in output]'
|
'*+'{no,}'cmd[print initial comment in output]'
|
||||||
'*+'{no,}'short[print terse output]'
|
'*+'{no,}'short[print terse output]'
|
||||||
|
@ -34,15 +52,14 @@ local -a alts args
|
||||||
'*+'{no,}'question[print question section of a query]'
|
'*+'{no,}'question[print question section of a query]'
|
||||||
'*+'{no,}'answer[print answer section of a reply]'
|
'*+'{no,}'answer[print answer section of a reply]'
|
||||||
'*+'{no,}'authority[print authority section of a reply]'
|
'*+'{no,}'authority[print authority section of a reply]'
|
||||||
'*+'{no,}'additional[print additional section of a reply]'
|
|
||||||
'*+'{no,}'all[set all print/display flags]'
|
'*+'{no,}'all[set all print/display flags]'
|
||||||
'*+time=[set query timeout]:timeout (seconds)'
|
'*+'{no,}'subnet[send EDNS client subnet option]:addr/prefix-length'
|
||||||
|
'*+timeout=[set query timeout]:timeout (seconds) [5]'
|
||||||
'*+tries=[specify number of UDP query attempts]:tries'
|
'*+tries=[specify number of UDP query attempts]:tries'
|
||||||
'*+retry=[specify number of UDP query retries]:retries'
|
'*+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'
|
'*+ndots=[specify number of dots to be considered absolute]:dots'
|
||||||
'*+bufsize=[specify UDP buffer size]:size (bytes)'
|
'*+bufsize=[specify UDP buffer size]:size (bytes)'
|
||||||
'*+edns=[specify EDNS version for query]:version (0-255)'
|
|
||||||
'*+noedns[clean EDNS version]'
|
|
||||||
'*+'{no,}'multiline[verbose multi-line output]'
|
'*+'{no,}'multiline[verbose multi-line output]'
|
||||||
'*+'{no,}'onesoa[AXFR prints only one soa record]'
|
'*+'{no,}'onesoa[AXFR prints only one soa record]'
|
||||||
'*+'{no,}"fail[don't try next server on SERVFAIL]"
|
'*+'{no,}"fail[don't try next server on SERVFAIL]"
|
||||||
|
@ -52,6 +69,10 @@ local -a alts args
|
||||||
'*+trusted-key=[specify file conrtaing trusted kets]:file:_files'
|
'*+trusted-key=[specify file conrtaing trusted kets]:file:_files'
|
||||||
'*+'{no,}'topdown[do DNSSEC validation in top down mode]'
|
'*+'{no,}'topdown[do DNSSEC validation in top down mode]'
|
||||||
'*+'{no,}'nsid[include EDNS name server ID request in query]'
|
'*+'{no,}'nsid[include EDNS name server ID request in query]'
|
||||||
|
'*+'{no,}'ttlid[display the TTL whening printing the record]'
|
||||||
|
'*+'{no,}'ttlunits[display the TTL in human-readable units]'
|
||||||
|
'*+'{no,}'unknownformat[print RDATA in RFC 3597 "unknown" format]'
|
||||||
|
'*+'{no,}'zflag[set Z flag in query]'
|
||||||
)
|
)
|
||||||
_arguments -s -C $args \
|
_arguments -s -C $args \
|
||||||
'(- *)-h[display help information]' \
|
'(- *)-h[display help information]' \
|
||||||
|
|
|
@ -10,4 +10,5 @@ _arguments -s \
|
||||||
'--dump-bin=[dump DMI data to a binary file]:file:_files' \
|
'--dump-bin=[dump DMI data to a binary file]:file:_files' \
|
||||||
'(-d --dev-mem)--from-dump=[read DMI data from a binary file]:file:_files' \
|
'(-d --dev-mem)--from-dump=[read DMI data from a binary file]:file:_files' \
|
||||||
"--no-sysfs[don't attempt to read DMI data from sysfs files]" \
|
"--no-sysfs[don't attempt to read DMI data from sysfs files]" \
|
||||||
|
'--oem-string=[only display the value of the specified OEM string]:OEM string number' \
|
||||||
'(-)'{-V,--version}'[display version information]'
|
'(-)'{-V,--version}'[display version information]'
|
||||||
|
|
|
@ -13,7 +13,7 @@ if [[ $state = subargs ]]; then
|
||||||
curcontext="${curcontext%:*}-$words[1]:"
|
curcontext="${curcontext%:*}-$words[1]:"
|
||||||
case $words[1] in
|
case $words[1] in
|
||||||
help) state=subcmds;;
|
help) state=subcmds;;
|
||||||
get|range|reset|writable|monitor)
|
describe|get|range|reset|writable|monitor)
|
||||||
_arguments ':schema:->schemata' ':key:->keys'
|
_arguments ':schema:->schemata' ':key:->keys'
|
||||||
;;
|
;;
|
||||||
set)
|
set)
|
||||||
|
|
|
@ -30,7 +30,6 @@ _arguments -s \
|
||||||
'--noconnect[disable autoconnect]' \
|
'--noconnect[disable autoconnect]' \
|
||||||
'(-n --nick)'{-n,--nick=}'[set nick name]:nick:_irssi_nick' \
|
'(-n --nick)'{-n,--nick=}'[set nick name]:nick:_irssi_nick' \
|
||||||
'(-h --hostname)'{-h,--hostname=}'[specify hostname]:hostname:_hosts' \
|
'(-h --hostname)'{-h,--hostname=}'[specify hostname]:hostname:_hosts' \
|
||||||
'(-d --dummy)'{-d,--dummy}'[use the dummy terminal mode]' \
|
|
||||||
'(-)'{-v,--version}'[display version information]' \
|
'(-)'{-v,--version}'[display version information]' \
|
||||||
'(-)'{-\?,--help}'[display help information]' \
|
'(-)'{-\?,--help}'[display help information]' \
|
||||||
'(-)--usage[display usage]'
|
'(-)--usage[display usage]'
|
||||||
|
|
|
@ -51,7 +51,7 @@ _ssh () {
|
||||||
'(-1)-m+[specify mac algorithms]:mac spec:->macs' \
|
'(-1)-m+[specify mac algorithms]:mac spec:->macs' \
|
||||||
'(-1)-N[do not execute a remote command (protocol version 2 only)]' \
|
'(-1)-N[do not execute a remote command (protocol version 2 only)]' \
|
||||||
'-n[redirect stdin from /dev/null]' \
|
'-n[redirect stdin from /dev/null]' \
|
||||||
'-O: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"))' \
|
'-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[use non privileged port]' \
|
||||||
'-p+[specify port on remote host]:port number on remote host' \
|
'-p+[specify port on remote host]:port number on remote host' \
|
||||||
'(-v)*-q[quiet operation]' \
|
'(-v)*-q[quiet operation]' \
|
||||||
|
@ -150,7 +150,7 @@ _ssh () {
|
||||||
"$p1($cmn)-E[specify hash algorithm for displayed fingerprints]:hash algorithim:(md5 sha256)" \
|
"$p1($cmn)-E[specify hash algorithm for displayed fingerprints]:hash algorithim:(md5 sha256)" \
|
||||||
- create \
|
- create \
|
||||||
'(-P -m)-q[silence ssh-keygen]' \
|
'(-P -m)-q[silence ssh-keygen]' \
|
||||||
"(-P -m)-t[specify the type of the key to create]:key type:(rsa1 rsa dsa ecdsa ed25519)" \
|
"(-P -m)-t[specify the type of the key to create]:key type:(rsa dsa ecdsa ed25519)" \
|
||||||
- dns \
|
- dns \
|
||||||
"($cmn)-r[print DNS resource record]:hostname:_hosts" \
|
"($cmn)-r[print DNS resource record]:hostname:_hosts" \
|
||||||
"$p1($cmn)-g[use generic DNS format]" \
|
"$p1($cmn)-g[use generic DNS format]" \
|
||||||
|
|
|
@ -10,6 +10,7 @@ _arguments \
|
||||||
'(-)'{-h,-help}'[display usage information]' \
|
'(-)'{-h,-help}'[display usage information]' \
|
||||||
'(-selection)-selection[selection to access]:selection:(primary secondary clipboard buffer-cut)' \
|
'(-selection)-selection[selection to access]:selection:(primary secondary clipboard buffer-cut)' \
|
||||||
"-noutf8[operate in legacy, non-Unicode, mode]" \
|
"-noutf8[operate in legacy, non-Unicode, mode]" \
|
||||||
|
'(-r -rmlastnl)ipq{-r,-rmlastnl}'[remove the last newline character if present]' \
|
||||||
'(-)-version[display version information]' \
|
'(-)-version[display version information]' \
|
||||||
'(-quiet -verbose)-silent[errors only, run in background]' \
|
'(-quiet -verbose)-silent[errors only, run in background]' \
|
||||||
"(-silent -verbose)-quiet[run in foreground, show what's happening]" \
|
"(-silent -verbose)-quiet[run in foreground, show what's happening]" \
|
||||||
|
|
Loading…
Reference in a new issue