From: Jun T <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: Re: PATCH: shutdown completion
Date: Tue, 3 Apr 2018 18:52:44 +0900 [thread overview]
Message-ID: <8CA7C564-250E-498E-BCB0-518FBA10FF00@kba.biglobe.ne.jp> (raw)
In-Reply-To: <18406.1522407738@thecus>
Add support for macOS.
Are there any linux systems (not using systemd) where
'-p' (lower case 'p') means 'turn off power after shutdown'?
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+=(
next prev parent reply other threads:[~2018-04-03 9:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-30 11:02 Oliver Kiddle
2018-04-03 9:52 ` Jun T [this message]
2018-05-19 8:57 ` Oliver Kiddle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8CA7C564-250E-498E-BCB0-518FBA10FF00@kba.biglobe.ne.jp \
--to=takimoto-j@kba.biglobe.ne.jp \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).