mirror of
https://git.code.sf.net/p/zsh/code
synced 2026-04-18 06:53:35 -04:00
16 lines
675 B
Plaintext
16 lines
675 B
Plaintext
#compdef fstat
|
|
|
|
local pids
|
|
pids=(${${${(f)"$(/usr/bin/procstat -ah)"}/[[:space:]]#/}/[[:space:]]*[[:space:]](ELF[[:digit:]]#[[:space:]]|-[[:space:]]#)/:})
|
|
|
|
_arguments -s \
|
|
'-f[restrict examination to files open in the same file systems as the named file arguments]' \
|
|
'-M[extract values associated with the name list from the specified core]:core:_files' \
|
|
'-N[extract the name list from the specified system]:system:' \
|
|
'-m[include memory-mapped files in the listing]' \
|
|
'-n[numerical format]' \
|
|
'-p[report all files open by the specified process]:process id:(($pids))' \
|
|
'-u[report all files open by the specified user]:user:_users' \
|
|
'-v[verbose mode]' \
|
|
'*:files:_files'
|