about summary refs log tree commit diff
path: root/Completion/Unix/Command/_service
diff options
context:
space:
mode:
authorOliver Kiddle <okiddle@yahoo.co.uk>2018-08-28 23:16:54 +0200
committerOliver Kiddle <okiddle@yahoo.co.uk>2018-08-29 17:32:10 +0200
commit245503929e0369e985e694684b557aef6d1432eb (patch)
tree56a50e092bf96d19d0d599615d7ce404a1d44aa7 /Completion/Unix/Command/_service
parentfcb4f7956799c1e0803c0cb37ee3d17c230d7dcc (diff)
downloadzsh-245503929e0369e985e694684b557aef6d1432eb.tar.gz
zsh-245503929e0369e985e694684b557aef6d1432eb.tar.xz
zsh-245503929e0369e985e694684b557aef6d1432eb.zip
43346: various completion option updates
Diffstat (limited to 'Completion/Unix/Command/_service')
-rw-r--r--Completion/Unix/Command/_service20
1 files changed, 12 insertions, 8 deletions
diff --git a/Completion/Unix/Command/_service b/Completion/Unix/Command/_service
index 50e8607bf..1216f57a8 100644
--- a/Completion/Unix/Command/_service
+++ b/Completion/Unix/Command/_service
@@ -5,24 +5,28 @@
 # _sub_command happy
 
 # we are interested in init service only
-local args ctx="${curcontext}argument-1:"
+local args actions ctx="${curcontext}argument-1:"
 zstyle -T  ":completion:${ctx}" tag-order && \
   zstyle ":completion:${ctx}" tag-order init
 
 case $OSTYPE in
+  freebsd<11->.*)
+    args=( '-j+[perform actions in specified jail]:jail:_jails' )
+  ;&
   freebsd*|dragonfly*)
-    args=(
-      '(-)-r[show the results of boot time rcorder]'
-      '(-)-R[restart all enabled local services]'
+    actions=(
+      '(*)-r[show the results of boot time rcorder]'
+      '(*)-R[restart all enabled local services]'
     )
   ;&
   netbsd*)
     _arguments -s $args \
-      '(-)-e[show services that are enabled]' \
-      '(-)-l[list all scripts in /etc/rc.d and the local startup directory]' \
       '(-e -R)-v[verbose]' \
-      ':service name:_services' \
-      '*::service argument:_init_d'
+      '*::service argument:_init_d' \
+      + '(actions)' $actions \
+      '(*)-e[show services that are enabled]' \
+      '(*)-l[list all scripts in /etc/rc.d and the local startup directory]' \
+      ':service name:_services'
   ;;
   *)
     _arguments -s \