From a429cad22cfa67b435f6520951775fdf5376c307 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Wed, 9 Jul 2025 19:07:50 +0200 Subject: [PATCH] =?UTF-8?q?main=20=E2=86=92=20log?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sh/log/log.sh | 12 ++++++++++++ sh/main.sh | 14 -------------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/sh/log/log.sh b/sh/log/log.sh index f5e13b1..a7c9c36 100644 --- a/sh/log/log.sh +++ b/sh/log/log.sh @@ -69,6 +69,18 @@ rwx_log_warn() { fi } +# TODO simplify + +_rwx_main_log() { + if rwx_main_interactive; then + [ ${#} -gt 0 ] || set -- "" + local line + for line in "${@}"; do + echo "${line}" + done + fi +} + _rwx_log() { local prefix="${1}" shift diff --git a/sh/main.sh b/sh/main.sh index 3aa62c2..a7d1781 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -55,20 +55,6 @@ rwx_main_interactive() { esac } -# ╭──────┬─────╮ -# │ main │ log │ -# ╰──────┴─────╯ - -_rwx_main_log() { - if rwx_main_interactive; then - [ ${#} -gt 0 ] || set -- "" - local line - for line in "${@}"; do - echo "${line}" - done - fi -} - # ╭──────┬──────╮ # │ main │ main │ # ╰──────┴──────╯