From fe5f6b7cdde2efdf0d55697fcf107d4c2df086bd Mon Sep 17 00:00:00 2001 From: Noah Pederson Date: Wed, 5 Feb 2025 10:42:16 -0600 Subject: [PATCH] CLEANUP: bin helper function --- fish/config.fish | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/fish/config.fish b/fish/config.fish index f693fb8..f1177c0 100644 --- a/fish/config.fish +++ b/fish/config.fish @@ -55,18 +55,17 @@ set -Ux NATS_CA /srv/nats/minica.pem set -Ux NATS_CERT /srv/nats/odin.packetlost.dev/cert.pem set -Ux NATS_KEY /srv/nats/odin.packetlost.dev/key.pem -if test -d "$HOME/.cargo" - fish_add_path "$HOME/.cargo/bin" +function add_to_path_if_exists -a directory + if test -d "$directory" + fish_add_path "$directory" + end end -if test -d "$HOME/.local" - fish_add_path "$HOME/.local/bin" -end - - -if test -d "$HOME/.local/share/solana/install/active_release/bin" - fish_add_path "$HOME/.local/share/solana/install/active_release/bin" -end +add_to_path_if_exists "$HOME/.local/share/solana/install/active_release/bin" +add_to_path_if_exists "$HOME/.local/bin" +add_to_path_if_exists "$HOME/.cargo/bin" +add_to_path_if_exists "$HOME/go/bin" +add_to_path_if_exists "$HOME/.gerbil/bin" +add_to_path_if_exists "/opt/gerbil/bin" -# Keybindings fish_default_key_bindings -- 2.54.0