commit c4ed31db09eb96f8df07db8303b79771b3fe42c7
parent be38002054ccf7266a354240134c95042587005a
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date: Thu, 28 Jul 2022 23:08:58 +0200
Fix parameter name
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/command/s b/command/s
@@ -1,4 +1,5 @@
#!/bin/zsh
+setopt no_unset warn_create_global extended_glob
typeset -g default_bundle=ok-all
@@ -28,7 +29,7 @@ load_s6_rc() {
done
for b in $bundles; do
bundle_services[$b]=$( s6-rc listall $b ) || exit $?
- for s in "${(@f)bundle_svcs[$b]}"; do
+ for s in "${(@f)bundle_services[$b]}"; do
service_in_bundle[$s//$b]=1
service_bundles[$s]+=$b$'\n'
done
@@ -49,6 +50,7 @@ show_longruns() {
local -A fmt_up=( up '%F{green}%BU%b%f' down '%F{red}D%f' starting '%F{magenta}%B?%b%f' )
local s svcdir state active
for svcdir in /run/service/*(/); do
+ s=$svcdir:t
if sv_stat=( s6-svstat $svcdir ); then
state=$sv_stat[1]
[[ $state == up && $sv_stat[3] == ? ]] && state=starting