From c59ea9601b107445f6ba29f140234ed7cb001bee Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Sun, 17 Jan 2021 11:48:41 +0800 Subject: [PATCH] [feature] add dotfiles/bin to path --- cli/fish/config.fish | 2 +- cli/fish/functions/append_paths.fish | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/fish/config.fish b/cli/fish/config.fish index 8edf169..2f1fbd9 100644 --- a/cli/fish/config.fish +++ b/cli/fish/config.fish @@ -53,7 +53,7 @@ if status is-interactive alias dt='date "+%Y%m%d-%H%M%S"' # === PATH and file sourcing - append_paths ~/.yarn/bin + append_paths ~/.yarn/bin ~/dotfiles/bin source_files /usr/share/autojump/autojump.fish /usr/local/share/autojump/autojump.fish \ ~/.profile.fish diff --git a/cli/fish/functions/append_paths.fish b/cli/fish/functions/append_paths.fish index 67aa141..58e8c12 100644 --- a/cli/fish/functions/append_paths.fish +++ b/cli/fish/functions/append_paths.fish @@ -1,6 +1,6 @@ function append_paths for f in $argv - test -e $f && set -gx PATH $f $PATH + test -e $f && ! contains $f $PATH && set -gx PATH $f $PATH end end