From bbb7cff04d6ef02c05bb1a9d4ed05f0eb6870829 Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Tue, 5 Mar 2024 18:21:39 -0500 Subject: [PATCH] Handle missing Python more gracefully. Fixes #335 --- functions/fish_prompt.fish | 3 +++ 1 file changed, 3 insertions(+) diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index 81ff6eb..e336245 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -887,6 +887,9 @@ function __bobthefish_virtualenv_python_version -S -d 'Get current Python versio end function __bobthefish_prompt_virtualfish -S -d "Display current Python virtual environment (only for virtualfish, virtualenv's activate.fish changes prompt by itself) or conda environment." + type -fq python + or return + [ "$theme_display_virtualenv" = 'no' -o -z "$VIRTUAL_ENV" -a -z "$CONDA_DEFAULT_ENV" ] and return