From 757efc3ec63041e88b5d35a6ac834ccf2d163d60 Mon Sep 17 00:00:00 2001 From: pika Date: Mon, 17 Mar 2025 12:33:59 +0100 Subject: [PATCH] fix: changes --- .zshenv | 7 ++++++- .zshrc | 2 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.zshenv b/.zshenv index d9af8b8..10c7de6 100644 --- a/.zshenv +++ b/.zshenv @@ -1,3 +1,8 @@ +# ─< Check if the given command exists silently >───────────────────────────────────────── +command_exists() { + command -v "$@" >/dev/null 2>&1 +} + # ─< paths >────────────────────────────────────────────────────────────────────────────── if [ -d "$HOME/.local/bin" ]; then export PATH="$HOME/.local/bin:$PATH" @@ -6,7 +11,7 @@ if [ -d "$HOME/.local/bin" ]; then fi fi -if command -v nvim 2 >/dev/null &>1; then +if command_exists nvim; then export EDITOR="nvim" else # ─< linux binary via script installation >─────────────────────────────────────────────── diff --git a/.zshrc b/.zshrc index b59bc38..1cbe19f 100644 --- a/.zshrc +++ b/.zshrc @@ -1,5 +1,3 @@ -[[ -e "$HOME/.zshdef" ]] && . "$HOME/.zshdef" # <-- Defaults like echos and colors - # ─< Check if the given command exists silently >───────────────────────────────────────── command_exists() { command -v "$@" >/dev/null 2>&1