fix: zshenv echos
This commit is contained in:
parent
b6464e1707
commit
f9071cba33
1 changed files with 27 additions and 0 deletions
27
.zshenv
27
.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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue