This commit is contained in:
Marc Beninca 2024-11-25 18:20:08 +01:00
parent b9158be284
commit 80463e9213
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 9 additions and 5 deletions

View file

@ -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
}

View file

@ -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
;;
*) ;;