* [patch] Add rogue and descriptions to _rcctl ls
@ 2021-10-27 0:50 Matthew Martin
0 siblings, 0 replies; only message in thread
From: Matthew Martin @ 2021-10-27 0:50 UTC (permalink / raw)
To: zsh-workers
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 \
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-10-27 0:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27 0:50 [patch] Add rogue and descriptions to _rcctl ls Matthew Martin
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).