mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-23 17:01:05 +02:00
17 lines
706 B
Text
17 lines
706 B
Text
#compdef procstat
|
|
|
|
local pids
|
|
#get list of pids and associated process name as comment
|
|
pids=(${${${(f)"$(/usr/bin/procstat -ah)"}/[[:space:]]#/}/[[:space:]]*[[:space:]](ELF[[:digit:]]#[[:space:]]|-[[:space:]]#)/:})
|
|
|
|
_arguments -s \
|
|
'-b[display binary information for the process]' \
|
|
'-c[display command line arguments for the process]' \
|
|
'-f[display file descriptor information for the process]' \
|
|
'-k[display the stacks of kernel threads in the process]' \
|
|
'-s[display security credential information for the process]' \
|
|
'-t[display thread information for the process]' \
|
|
'-v[display virtual memory mappings for the process]' \
|
|
'-h[suppress table headers]' \
|
|
'-a[all processes]' \
|
|
':process id:(($pids))'
|