about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2021-04-08 22:24:52 +0900
committerJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2021-04-08 22:24:52 +0900
commit62e86515e79e57e791bc9f5ed815e8020d1dcf6b (patch)
tree8c1384b77ad916d6c5d50ef518d0e43891a8021c
parente4a8740c789970178b81162349e4b33104b6f482 (diff)
downloadzsh-62e86515e79e57e791bc9f5ed815e8020d1dcf6b.tar.gz
zsh-62e86515e79e57e791bc9f5ed815e8020d1dcf6b.tar.xz
zsh-62e86515e79e57e791bc9f5ed815e8020d1dcf6b.zip
48416: update _gcore for macOS and GNU
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_gcore16
2 files changed, 18 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c7a88bff..18c576b5c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2021-04-08  Jun-ichi Takimoto  <takimoto-j@kba.biglobe.ne.jp>
+
+	* 48416: Completion/Unix/Command/_gcore: support macOS, with
+	update for GNU gcore
+
 2021-04-08  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
 	* 48410: Doc/Zsh/metafaq.yo, Etc/FAQ.yo: FAQ, METAFAQ: Mention
diff --git a/Completion/Unix/Command/_gcore b/Completion/Unix/Command/_gcore
index 07a65cd9a..913ef25ca 100644
--- a/Completion/Unix/Command/_gcore
+++ b/Completion/Unix/Command/_gcore
@@ -49,10 +49,20 @@ case $OSTYPE in
       '::executable:' \
       ':pid:_pids'
   ;;
+  darwin*)
+    _arguments -s -A '-*' \
+      '-s[suspend the process while the core file is captured]' \
+      '-v[report progress on the dump as it proceeds]' \
+      '-b+[specify maximum size of core file]:size (MiB): ' \
+      '(-c)-o+[write core file to specified file]:file:_files' \
+      '(-o)-c+[specify format of core file name]:format:{_message "%%N\:program name, %%U\:uid, %%P\:pid, %%T\:time stamp"}' \
+      '1:pid:_pids'
+  ;;
   *)
     # GNU GDB gcore
-    _arguments \
-      '-o[set core file base name]:file base name:_files' \
-      ':pid:_pids'
+    _arguments -s -A '-*' \
+      '-a[dump all memory mappings]' \
+      '-o+[set core file base name]:file base name:_files' \
+      '*:pid:_pids'
   ;;
 esac