Files
dotfiles/fish/functions/ensure_path.fish
Tim McCarthy 3ccf865b99 Fish config refactor
Move things into sub-files and sub-directories
Add ensure_path function to make sure stuff doesn't get spammed multiple
times into the PATH
2020-03-31 12:42:50 -07:00

8 lines
218 B
Fish

function ensure_path --description "Ensures directories are in $PATH"
for pathdir in $argv
if not set -l index (contains -i $pathdir $PATH)
set -g -x PATH $pathdir $PATH
end
end
end