zsh-workers
 help / color / mirror / code / Atom feed
From: Matthew Martin <phy1729@gmail.com>
To: zsh-workers@zsh.org
Subject: [patch] Add rogue and descriptions to _rcctl ls
Date: Tue, 26 Oct 2021 19:50:35 -0500	[thread overview]
Message-ID: <YXiiW9GJG5uwpxb7@CptOrmolo.darkstar> (raw)

OpenBSD recently added rogue as a class to rcctl ls. Since the meaning
isn't immediately obvious from the name, I've added descriptions as well.


diff --git a/Completion/BSD/Command/_rcctl b/Completion/BSD/Command/_rcctl
index 62cb8f634..44ba0f28b 100644
--- a/Completion/BSD/Command/_rcctl
+++ b/Completion/BSD/Command/_rcctl
@@ -1,11 +1,20 @@
 #compdef rcctl
 
 local context state line
-local -a actions subcmds variables
+local -a actions lsarg subcmds variables
 
 actions=(check reload restart start stop)
 subcmds=(disable enable get getdef ls order set)
 variables=(class flags status timeout user)
+lsarg=(
+  'all:all services and daemons'
+  'failed:enabled but stopped daemons'
+  'off:disabled services and daemons'
+  'on:enabled services and daemons'
+  'rogue:daemons which are disabled but currently running'
+  'started:running daemons'
+  'stopped:stopped daemons'
+)
 
 if [[ $service == "rcctl" ]]; then
   _arguments -C \
@@ -23,7 +32,7 @@ case $service in
       ':variable:compadd -a variables'
     ;;
   ls)
-     _arguments ':display a list of services and daemons matching:(all failed off on started stopped)'
+    _arguments ':display a list of services and daemons matching:(($lsarg))'
     ;;
   order)
     _arguments \


                 reply	other threads:[~2021-10-27  0:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=YXiiW9GJG5uwpxb7@CptOrmolo.darkstar \
    --to=phy1729@gmail.com \
    --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).