summary refs log tree commit diff
path: root/Completion/Unix/Command/_shutdown
diff options
context:
space:
mode:
authorJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2018-04-05 10:34:12 +0900
committerJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2018-04-05 10:34:12 +0900
commit35734810d1b042ca1fb4508ae3813ef999ff1aa9 (patch)
treecd0b79529c4dcdd83f7c2156c4090644dc61399d /Completion/Unix/Command/_shutdown
parente9a76d392449801456c4b47733f187d219477786 (diff)
downloadzsh-35734810d1b042ca1fb4508ae3813ef999ff1aa9.tar.gz
zsh-35734810d1b042ca1fb4508ae3813ef999ff1aa9.tar.xz
zsh-35734810d1b042ca1fb4508ae3813ef999ff1aa9.zip
42578: _shutdown: add support for macOS
Diffstat (limited to 'Completion/Unix/Command/_shutdown')
-rw-r--r--Completion/Unix/Command/_shutdown15
1 files changed, 13 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_shutdown b/Completion/Unix/Command/_shutdown
index 1ac6e61ba..9726182a0 100644
--- a/Completion/Unix/Command/_shutdown
+++ b/Completion/Unix/Command/_shutdown
@@ -17,10 +17,9 @@ if [[ -d /etc/systemd ]]; then
 fi
 
 case $OSTYPE in
-  *bsd*|dragonfly*|linux*)
+  *bsd*|dragonfly*|linux*|darwin*)
     args=(
       '-h[halt the system after shutdown]'
-      '-p[turn off power after shutdown]'
       '-r[reboot the system]'
       '-k[kick everybody off]'
       '-n[prevent file system cache from being flushed]'
@@ -28,6 +27,11 @@ case $OSTYPE in
       '*:warning message'
     )
   ;|
+  *bsd*|dragonfly*|linux*)
+    args=(
+      '-p[turn off power after shutdown]'
+    )
+  ;|
   (net|open)bsd*)
     args+=(
       '-d[cause system to perform a dump]'
@@ -48,6 +52,13 @@ case $OSTYPE in
       '-D[prevent shutdown from detaching from the tty]'
     )
   ;;
+  darwin*)
+    args+=(
+      '-o[execute halt or reboot instead of sending a signal to launchd]'
+      '-s[put the system to sleep]'
+      '-u[with -h, wait 5 minutes before removing power]'
+    )
+  ;;
   solaris2.<11->) args=( '(-i)-r[reboot]' ) ;&
   solaris*)
     args+=(