mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-21 00:01:26 +01:00
15 lines
675 B
Text
15 lines
675 B
Text
#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'
|