From 8f0288b0c97dbc7c615e32cf073896d080914ee4 Mon Sep 17 00:00:00 2001 From: Ajeet D'Souza <98ajeet@gmail.com> Date: Sat, 10 May 2025 10:22:20 -0700 Subject: [PATCH] Check if zoxide is running under VS Code --- templates/bash.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/bash.txt b/templates/bash.txt index 4075ec2..b2331a8 100644 --- a/templates/bash.txt +++ b/templates/bash.txt @@ -66,8 +66,9 @@ function __zoxide_doctor() { return 0 {%- else %} - [[ ${_ZO_DOCTOR:-1} -ne 0 ]] || return 0 - [[ ${PROMPT_COMMAND:=} != *'__zoxide_hook'* ]] || return 0 + [[ "${_ZO_DOCTOR:-1}" -eq 0 ]] && return 0 + [[ "${PROMPT_COMMAND:-}" == *'__zoxide_hook'* ]] && return 0 + [[ "${__vsc_original_prompt_command[@]:-}" == *'__zoxide_hook'* ]] && return 0 _ZO_DOCTOR=0 \builtin printf '%s\n' \