fix: zshenv echos

This commit is contained in:
piecka 2025-03-18 10:05:09 +01:00
parent b6464e1707
commit f9071cba33

27
.zshenv
View file

@ -1,3 +1,30 @@
# ───────────────────────────────────< Message storage >─────────────────────────────────
typeset -A _MESSAGES
_MESSAGES=(
[error]=""
[warn]=""
[info]=""
)
# Define color variables
RED='\033[0;31m'
YELLOW='\033[0;33m'
CYAN='\033[0;36m'
NC='\033[0m' # No Color
BOLD='\033[1m'
# Functions to store messages
echo_error() {
_MESSAGES[error]+="${RED}❌ $1${NC}\n"
}
echo_warning() {
_MESSAGES[warn]+="${YELLOW}⚠️ $1${NC}\n"
}
echo_info() {
_MESSAGES[info]+="${CYAN} $1${NC}\n"
}
# ─< Check if the given command exists silently >───────────────────────────────────────── # ─< Check if the given command exists silently >─────────────────────────────────────────
command_exists() { command_exists() {
command -v "$@" >/dev/null 2>&1 command -v "$@" >/dev/null 2>&1