From 1db21f0f043f4a5e5961f2f41476ee42df436df4 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Sun, 29 Sep 2024 16:07:43 -0400 Subject: [PATCH] tidy fnm and uv wrappers when not installed --- fish/.config/fish/conf.d/fnm.fish | 6 ++++-- fish/.config/fish/conf.d/uv.env.fish | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/fish/.config/fish/conf.d/fnm.fish b/fish/.config/fish/conf.d/fnm.fish index d8d7596..84fe182 100644 --- a/fish/.config/fish/conf.d/fnm.fish +++ b/fish/.config/fish/conf.d/fnm.fish @@ -1,3 +1,5 @@ # fnm -set PATH "/home/ben/.local/share/fnm" $PATH -fnm env | source +fish_add_path --path ~/.local/share/fnm +if command -q fnm + fnm env | source +end diff --git a/fish/.config/fish/conf.d/uv.env.fish b/fish/.config/fish/conf.d/uv.env.fish index cabfa80..b56bee0 100644 --- a/fish/.config/fish/conf.d/uv.env.fish +++ b/fish/.config/fish/conf.d/uv.env.fish @@ -1,2 +1,3 @@ - -source "$HOME/.cargo/env.fish" +if test -f ~/.cargo/env.fish + source ~/.cargo/env.fish +end