diff options
author | Oliver Kiddle <opk@zsh.org> | 2015-05-03 16:53:47 +0200 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2015-05-03 16:53:57 +0200 |
commit | ab7ec8d9851fea8230e1ccfba284c5bfaf457d88 (patch) | |
tree | 837b14c838b96728ebdb530eb20d35737ef8419b /Completion/Unix/Command/_gcore | |
parent | b29278c69a67089ba225a98478069eb3f32ab4e6 (diff) | |
download | zsh-ab7ec8d9851fea8230e1ccfba284c5bfaf457d88.tar.gz zsh-ab7ec8d9851fea8230e1ccfba284c5bfaf457d88.tar.xz zsh-ab7ec8d9851fea8230e1ccfba284c5bfaf457d88.zip |
35011: update completions for some common Unix commands,
in particular improving FreeBSD support
Diffstat (limited to 'Completion/Unix/Command/_gcore')
-rw-r--r-- | Completion/Unix/Command/_gcore | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_gcore b/Completion/Unix/Command/_gcore new file mode 100644 index 000000000..4933ffee6 --- /dev/null +++ b/Completion/Unix/Command/_gcore @@ -0,0 +1,50 @@ +#compdef gcore + +case $OSTYPE in + solaris*) + local -a content + + content=( + 'anon[anonymous private mappings]' + 'ctf[CTF type information]' + 'data[writable private file mappings]' + 'dism[DISM mappings]' + 'heap[process heap]' + 'ism[ISM mappings]' + 'rodata[read-only private file mappings]' + 'shanon[anonymous shared mappings]' + 'shfile[file-backed shared mappings]' + 'shm[System V shared memory]' + 'stack[process stack]' + 'symtab[symbol table sections for loaded files]' + 'text[readable and executable private file mappings]' + ) + + _arguments -s \ + '(-c -g)-p[use per-process core file repository]' \ + '(-c -p)-g[use global core file repository]' \ + '-F[force grabbing the target process]' \ + '(-p -g)-c[set core file content]: :_values -s + "content" $content' \ + '-o[set core file base name]:file base name:_files' \ + '*:pid:_pids' + ;; + netbsd*) + _arguments \ + '-c+[write core file to specified file]:file:_files' \ + '*:pid:_pids' + ;; + freebsd*) + _arguments -s \ + '-c+[write core file to specified file]:file:_files' \ + '-f[dump all available segments]' \ + '-s[stop process while gathering image]' \ + '::executable:' \ + ':pid:_pids' + ;; + *) + # GNU GDB gcore + _arguments \ + '-o[set core file base name]:file base name:_files' \ + ':pid:_pids' + ;; +esac |