From b69fad50682798b7e1907742738dca2c02d00fd2 Mon Sep 17 00:00:00 2001 From: Shy Date: Wed, 7 Aug 2024 23:10:02 +0200 Subject: [PATCH] Print status message only if stdout is a terminal. --- wled | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wled b/wled index d61f3e1..b46f8b9 100755 --- a/wled +++ b/wled @@ -131,7 +131,7 @@ for wled_host in $host_list; do api_resp=$(curl_send "{'ps':$1}" "http://$wled_host/json") ;; l|list) # List presets. - printf "loading ...\r" + test -t 1 && printf 'connecting ...\r' active_ps=$(active_preset "$wled_host") curl_fetch "http://$wled_host/presets.json" | \ # Insert newline in front of every preset slice.