mirror of
https://tildegit.org/ben/dotfiles.git
synced 2025-03-28 08:50:41 +00:00
fix dups in $PATH with a backwards compatible solution
This commit is contained in:
parent
1662945d9c
commit
bcb5298353
@ -16,9 +16,9 @@ if test -d /usr/local/go
|
||||
set -x GOPATH (/usr/local/go/bin/go env GOPATH)
|
||||
end
|
||||
|
||||
set user_paths ~/bin /usr/local/go/bin ~/.yarn/bin $GOPATH/bin ~/.local/bin ~/.cargo/bin /snap/bin ~/.fzf/bin
|
||||
for path in $user_paths
|
||||
if test -d $path; and not echo $fish_user_paths | grep -q "$path"
|
||||
set my_paths ~/bin /usr/local/go/bin ~/.yarn/bin $GOPATH/bin ~/.local/bin ~/.cargo/bin /snap/bin ~/.fzf/bin
|
||||
for path in $my_paths
|
||||
if test -d $path; and not echo $fish_user_paths | grep -q "$path"; and not echo $PATH | grep -q "$path"
|
||||
set -x fish_user_paths $fish_user_paths $path
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user