From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25350 invoked by alias); 3 Apr 2018 09:52:48 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 42578 Received: (qmail 21095 invoked by uid 1010); 3 Apr 2018 09:52:48 -0000 X-Qmail-Scanner-Diagnostics: from rcpt-expgw.biglobe.ne.jp by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(133.208.98.4):SA:0(-2.6/5.0):. Processed in 0.853406 secs); 03 Apr 2018 09:52:48 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: takimoto-j@kba.biglobe.ne.jp X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Biglobe-Sender: From: Jun T Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: PATCH: shutdown completion Date: Tue, 3 Apr 2018 18:52:44 +0900 References: <18406.1522407738@thecus> To: zsh-workers@zsh.org In-Reply-To: <18406.1522407738@thecus> Message-Id: <8CA7C564-250E-498E-BCB0-518FBA10FF00@kba.biglobe.ne.jp> X-Mailer: Apple Mail (2.3273) X-Biglobe-Spnum: 65468 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 =20 case $OSTYPE in - *bsd*|dragonfly*|linux*) + *bsd*|dragonfly*|linux*|darwin*) args=3D( '-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=3D( + '-p[turn off power after shutdown]' + ) + ;| (net|open)bsd*) args+=3D( '-d[cause system to perform a dump]' @@ -48,6 +52,13 @@ case $OSTYPE in '-D[prevent shutdown from detaching from the tty]' ) ;; + darwin*) + args+=3D( + '-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=3D( '(-i)-r[reboot]' ) ;& solaris*) args+=3D(