diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2020-02-14 01:58:20 +0100 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2020-02-14 01:58:20 +0100 |
commit | bfc5d42735c1660263904ec5254cccf539a0a458 (patch) | |
tree | 9bbb81b4a53941427e6f9e65ae55027d9108df8c /Completion/Unix/Command/_lsof | |
parent | 74561cc51b8867e43cb2937ab2edfb36e2a829bf (diff) | |
parent | 643de931640e01aa246723d2038328ef33737965 (diff) | |
download | zsh-bfc5d42735c1660263904ec5254cccf539a0a458.tar.gz zsh-bfc5d42735c1660263904ec5254cccf539a0a458.zip |
Merge tag 'zsh-5.7.1-test-3' into debian
Test release: 5.7.1-test-3
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}' \ |