diff --git a/.zshenv b/.zshenv index 10c7de6..0b85ff6 100644 --- a/.zshenv +++ b/.zshenv @@ -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 >───────────────────────────────────────── command_exists() { command -v "$@" >/dev/null 2>&1