Doctor should handle PROMPT_COMMAND being an array

This commit is contained in:
Ajeet D'Souza 2025-05-10 23:41:55 -07:00
parent 306d7ae143
commit 36537410cd
2 changed files with 5 additions and 1 deletions

View File

@ -20,6 +20,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Bash: doctor now handles `PROMPT_COMMAND` being an array.
- Bash: doctor now handles Visual Studio Code's shell integration.
- Bash: completions now work with `ble.sh`.
- Nushell: stop ignoring symlinks when `cd`-ing into a directory.
- Fzf: updated minimum supported version to v0.51.0.
- PowerShell: avoid setting `$error` when defining `__zoxide_hooked`.

View File

@ -67,7 +67,8 @@ function __zoxide_doctor() {
{%- else %}
[[ ${_ZO_DOCTOR:-1} -eq 0 ]] && return 0
[[ ${PROMPT_COMMAND:-} == *'__zoxide_hook'* ]] && return 0
# shellcheck disable=SC2199
[[ ${PROMPT_COMMAND[@]:-} == *'__zoxide_hook'* ]] && return 0
# shellcheck disable=SC2199
[[ ${__vsc_original_prompt_command[@]:-} == *'__zoxide_hook'* ]] && return 0