dotfiles/zsh/func/prepend_to_path

13 lines
198 B
Bash

#!/usr/bin/env zsh
# vim:ft=zsh:
# Eryn Wells <eryn@erynwells.me>
function prepend_to_path
{
if [[ -d "$1" ]]; then
path=("$1" $path)
export path
fi
}
prepend_to_path "$@"