From 726fb410725dc6d8679b7c2bd334d9fccc9f40b9 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Mon, 12 May 2025 13:46:18 +0200 Subject: [PATCH] add msg_warn --- misc/core.func | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/misc/core.func b/misc/core.func index 72c7a96..7deffe5 100644 --- a/misc/core.func +++ b/misc/core.func @@ -318,6 +318,15 @@ msg_error() { printf "\r\e[2K%s %b\n" "${CROSS}" "${RD}${msg}${CL}" >&2 } +msg_warn() { + local msg="${1:-Warning}" + stop_spinner + printf "\r\e[2K%s %b\n" "${INFO}" "${YWB}${msg}${CL}" >&2 + + # Remove from shown messages to allow it to be shown again + unset MSG_INFO_SHOWN["$msg"] +} + # Helper function to display a message with custom symbol and color msg_custom() { local symbol="${1:-*}"