check if direnv exists in fish's prompt (fix error message when it is not available)

This commit is contained in:
Antoine Vaure 2024-10-21 01:01:32 +02:00
parent ced32e7c2a
commit 5c853a35ae

View file

@ -67,7 +67,9 @@
set -l prompt_status (__fish_print_pipestatus "[" "]" "|" "$status_color" "$statusb_color" $last_pipestatus)
# direnv status
if which direnv >/dev/null
set -l direnv_status (direnv status | grep -q "Found RC path" && echo " direnv")
end
# echo -n -s (prompt_login)' ' (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) \
echo -n -s (set_color $color_cwd) (prompt_pwd) $normal (fish_vcs_prompt) \