core-system-scripts

Scripts submodule for the core-system repository
git clone https://ccx.te2000.cz/git/core-system-scripts
Log | Files | Refs

commit f6399a9179f178ee0cdd3bf473308300e8c86d2a
parent c06fc64ac6015c2d60539baf12262c27a1b3f081
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date:   Fri, 29 Jul 2022 02:34:51 +0200

Check for presence instead of value

Diffstat:
Mcommand/s | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/command/s b/command/s @@ -99,7 +99,7 @@ show_oneshots() { local s pre post='%s' for s in $oneshots; do pre='' - if (($+service_active[$s] ^^ $service_in_bundle[$s//$default_bundle])); then + if (($+service_active[$s] ^^ $+service_in_bundle[$s//$default_bundle])); then pre='%S' fi printf "%s %s" ${(%)fmt_active[${service_active[$s]:-2}]} ${(%)pre}$s${(%)post} @@ -118,7 +118,7 @@ show_longruns() { active=3 fi pre='' - if (($+service_active[$s] ^^ $service_in_bundle[$s//$default_bundle])); then + if (($+service_active[$s] ^^ $+service_in_bundle[$s//$default_bundle])); then pre='%S' fi printf "%s %s" ${(%)fmt_up[$state]}${(%)fmt_active[$active]} ${(%)pre}$s${(%)post}