diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2009-11-12 19:34:34 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2009-11-12 19:34:34 +0000 |
commit | ffa186098c9f52c0ad84f57a62937db4d183c1c9 (patch) | |
tree | 5be50ec849b623c127dd05bec2f158676e1dae2c /Completion/BSD/Command/_procstat | |
parent | 31012c47d5dca7862f7962a583aaaa4deb98a50c (diff) | |
download | zsh-ffa186098c9f52c0ad84f57a62937db4d183c1c9.tar.gz zsh-ffa186098c9f52c0ad84f57a62937db4d183c1c9.tar.xz zsh-ffa186098c9f52c0ad84f57a62937db4d183c1c9.zip |
Baptiste Daroussin: 27379, 27381: BSD completions
Diffstat (limited to 'Completion/BSD/Command/_procstat')
-rw-r--r-- | Completion/BSD/Command/_procstat | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Completion/BSD/Command/_procstat b/Completion/BSD/Command/_procstat new file mode 100644 index 000000000..b6343beff --- /dev/null +++ b/Completion/BSD/Command/_procstat @@ -0,0 +1,17 @@ +#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))' |