Add fstat completion (complete) removes its entry in todo list
[zfbsd.git] / _fstat
blob0ea1013b1cd32c86f530d73a30be62a8d5f125dd
1 #compdef fstat
3 local pids
4 pids=(${${${(f)"$(/usr/bin/procstat -ah)"}/[[:space:]]#/}/[[:space:]]*[[:space:]](ELF32[[:space:]]|-[[:space:]]#)/:})
6 _arguments -s \
7 '-f[Restrict examination to files open in the same file systems as the named file arguments]' \
8 '-M[Extract values associated with the name list from the specified core]:core:_files' \
9 '-N[Extract the name list from the specified system]:system:' \
10 '-m[Include memory‐mapped files in the listing]' \
11 '-n[Numerical format]' \
12 '-p[Report all files open by the specified process]:Process id:(($pids))' \
13 '-u[Report all files open by the specified user]:User:_users' \
14 '-v[Verbose mode]' \
15 '*:Files:_files'