From ea17fc995a4b5e8054a45053a9695e57d1cc9e33 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 19 Nov 2024 12:29:30 +0100 Subject: [PATCH] prefix --- sh/log.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sh/log.sh b/sh/log.sh index 40cb311..1674324 100644 --- a/sh/log.sh +++ b/sh/log.sh @@ -58,7 +58,7 @@ _sh_log() { shift local line for line in "${@}"; do - printf "%s" "${prefix}" - echo " ${line}" + [ -n "${prefix}" ] && printf "%s" "${prefix} " + echo "${line}" done -} \ No newline at end of file +}