Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[patch] Add rogue and descriptions to _rcctl ls
- X-seq: zsh-workers 49529
- From: Matthew Martin <phy1729@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [patch] Add rogue and descriptions to _rcctl ls
- Date: Tue, 26 Oct 2021 19:50:35 -0500
- Archived-at: <https://zsh.org/workers/49529>
- List-id: <zsh-workers.zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
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 \
Messages sorted by:
Reverse Date,
Date,
Thread,
Author