if interactive

This commit is contained in:
Marc Beninca 2024-11-29 12:01:01 +01:00
parent eee9e38b7d
commit 1572a779ae
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -26,16 +26,13 @@ _sh_ifs_pop() {
}
_sh_main_log() {
case "${-}" in
*i*)
if sh_shell_interactive; then
[ ${#} -gt 0 ] || set -- ""
local line
for line in "${@}"; do
echo "${line}"
done
;;
*) ;;
esac
fi
}
# public
@ -115,10 +112,12 @@ sh_main() {
return 1
fi
sh_source_directory "${SH_USER}"
sh_log
sh_shellcheck "${SH_ROOT}"
sh_log
sh_help
if sh_shell_interactive; then
sh_log
sh_shellcheck "${SH_ROOT}"
sh_log
sh_help
fi
}
sh_main