diff --git a/sh/log.sh b/sh/log.sh index 1674324..4e7a63e 100644 --- a/sh/log.sh +++ b/sh/log.sh @@ -58,7 +58,10 @@ _sh_log() { shift local line for line in "${@}"; do - [ -n "${prefix}" ] && printf "%s" "${prefix} " - echo "${line}" + if [ -n "${prefix}" ]; then + _sh_main_log "${prefix} ${line}" + else + _sh_main_log "${line}" + fi done } diff --git a/sh/main.sh b/sh/main.sh index 4fbecc3..1cc1116 100644 --- a/sh/main.sh +++ b/sh/main.sh @@ -70,9 +70,10 @@ _sh_main_commands() { _sh_main_log() { case "${-}" in *i*) - local argument - for argument in "${@}"; do - echo "${argument}" + [ -n "${1}" ] || set -- "" + local line + for line in "${@}"; do + echo "${line}" done ;; *) ;;