From 22d79ae1213c9050755cfca13247e6db5beac973 Mon Sep 17 00:00:00 2001 From: Lucas Vasconcelos Date: Tue, 11 Aug 2020 20:11:24 -0300 Subject: [PATCH] make sure the shims folder is appended to path only once --- asdf.fish | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/asdf.fish b/asdf.fish index f7638daf..f60d2cdf 100644 --- a/asdf.fish +++ b/asdf.fish @@ -1,10 +1,13 @@ set -x ASDF_DIR (dirname (status -f)) -set -l asdf_data_dir ( - if test -n "$ASDF_DATA_DIR"; echo $ASDF_DATA_DIR; - else; echo $HOME/.asdf; end) + +if test -n $ASDF_DATA_DIR + set -l asdf_user_shims $ASDF_DATA_DIR/shims +else + set -l asdf_user_shims $HOME/.asdf +end # Add asdf to PATH -set -l asdf_bin_dirs $ASDF_DIR/bin $ASDF_DIR/shims $asdf_data_dir/shims +set -l asdf_bin_dirs $ASDF_DIR/bin $asdf_user_shims for x in $asdf_bin_dirs if test -d $x