From b7d187caaae56d8d98b26cec9e6c3feb0574d660 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Wed, 11 Sep 2024 00:13:44 -0700 Subject: [PATCH] shell/plugins: fix zoxide check issue --- .config/shell/plugins | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.config/shell/plugins b/.config/shell/plugins index 11ff103..c4c6641 100644 --- a/.config/shell/plugins +++ b/.config/shell/plugins @@ -2,7 +2,7 @@ # shell plugins for POSIX # Enable zoxide if it exists -if command zoxide > /dev/null 2>&1 || ${SKIP_ZOXIDE:-false}; then +if command -v zoxide > /dev/null 2>&1 || ${SKIP_ZOXIDE:-false}; then # Check what shell we're using based on variables that get set by non-posix shells - https://stackoverflow.com/a/3327022 if [ -n "${ZSH_NAME+set}" ]; then # zsh eval "$(zoxide init zsh)" @@ -12,4 +12,6 @@ if command zoxide > /dev/null 2>&1 || ${SKIP_ZOXIDE:-false}; then # assume posix eval "$(zoxide init posix --hook prompt)" fi + # make an alias (feels wrong to do it here, but feels worse to split it into ./aliases) + alias z=zoxide fi