test -f is not enough

This commit is contained in:
Natsu Kagami 2023-11-08 20:56:42 +01:00
parent 536eec198a
commit a268436f68
Signed by: nki
GPG key ID: 55A032EB38B49ADB

View file

@ -54,7 +54,7 @@ in
functions = tideItems ({
nix_shell = ''
# In a Nix Shell
if test -f $DIRENV_FILE && rg -q "^use flake" $DIRENV_FILE
if set -qx DIRENV_FILE && test -f $DIRENV_FILE && rg -q "^use flake" $DIRENV_FILE
set -U tide_nix_shell_color "FFA500"
set -U tide_nix_shell_bg_color normal
_tide_print_item nix_shell ""