mirror of https://tildegit.org/ben/dotfiles
fix dups in $PATH with a backwards compatible solution
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…
Reference in New Issue