diff options
author | Oliver Kiddle <okiddle@yahoo.co.uk> | 2019-08-19 16:15:49 +0200 |
---|---|---|
committer | Oliver Kiddle <okiddle@yahoo.co.uk> | 2019-08-19 16:15:49 +0200 |
commit | 359a8fce0085888306330354e567f1d0523d230d (patch) | |
tree | bd4bd8b53d11258373cfb71e79100fbe67fb05da /Completion/Unix/Command/_lsof | |
parent | c6254f2a93947035ce23b1787923efbda4e8aa9f (diff) | |
download | zsh-359a8fce0085888306330354e567f1d0523d230d.tar.gz zsh-359a8fce0085888306330354e567f1d0523d230d.tar.xz zsh-359a8fce0085888306330354e567f1d0523d230d.zip |
44587: completion option updates
Diffstat (limited to 'Completion/Unix/Command/_lsof')
-rw-r--r-- | Completion/Unix/Command/_lsof | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/Completion/Unix/Command/_lsof b/Completion/Unix/Command/_lsof index 86115a4ef..754012e3b 100644 --- a/Completion/Unix/Command/_lsof +++ b/Completion/Unix/Command/_lsof @@ -1,9 +1,16 @@ #compdef lsof -local curcontext="$curcontext" state line expl fields args alts suf hsuf pref ret=1 +local curcontext="$curcontext" ret=1 +local -a state line expl args vals fields alts suf hsuf pref case $OSTYPE in - linux*) args=( '-X[skip reporting of info on network connections]' ) ;; + linux*) + args=( + '-E[display endpoint info for pipes, sockets and pseudoterminal files but not files of the endpoints]' + '+E[display endpoint info for pipes, sockets and pseudoterminal files including files of the endpoints]' + '-X[skip reporting of info on network connections]' + ) + ;; solaris*) args=( '-X[include deleted files]' @@ -24,8 +31,8 @@ _arguments -C -s -S $args \ '+D[recursively search from specified dir]:search directory:_files -/' \ '-D[direct use of device cache file]:function:((\?\:report\ device\ cache\ file\ paths b\:build\ the\ device\ cache\ file i\:ignore\ the\ device\ cache\ file r\:read\ the\ device\ cache\ file u\:read\ and\ update\ the\ device\ cache\ file))' \ '*-+e[exempt filesystem from blocking kernel calls]:file system:_directories' \ - '-f[inhibit listing of kernel file structure info]::info type or path:(c f g G n)' \ - '+f[enable listing of kernel file structure info]::info type:(c f g G n)' \ + '-f[inhibit listing of kernel file structure info]::info type:->file-structures' \ + '+f[enable listing of kernel file structure info]::info type:->file-structures' \ '-F[select output fields]:fields:->fields' \ '-g[select by process group id]::process group id' \ '(*)*-i[select internet files]::address:->addresses' \ @@ -93,6 +100,18 @@ case $state in _sequence -s , _wanted -x file-descriptors expl "file descriptor" compadd - \ cwd err jld ltz mem mmap pd rtd tr txt v86 && ret=0 ;; + file-structures) + vals=( + 'g[file flag abbreviations]' + 'G[file flags in hexadecimal]' + ) + [[ $OSTYPE != linux* ]] && vals+=( + 'c[file structure use count]' + 'f[file structure address]' + 'n[file structure node address]' + ) + _values 'kernel file structures' $vals && ret=0 + ;; states) if compset -P 1 '*:'; then _sequence _wanted states expl state compadd - -M 'm:{a-z}={A-Z}' \ |