1
0
Fork 0

zsh: Load ASDF if it exists

This commit is contained in:
Jeremy Kaplan 2023-03-06 13:10:58 -08:00
commit e267cd31bf

View file

@ -1,3 +1,7 @@
has() {
command -V "$1" > /dev/null
}
source_if() { source_if() {
if [ -e "$1" ]; then if [ -e "$1" ]; then
source "$1" source "$1"
@ -17,13 +21,17 @@ path_if() {
source_if "${HOME}/.nix-profile/etc/profile.d/nix.sh" source_if "${HOME}/.nix-profile/etc/profile.d/nix.sh"
if has brew; then
source_if "$(brew --prefix asdf)/libexec/asdf.sh"
fi
path_if "$HOME/bin" path_if "$HOME/bin"
path_if "$HOME/.local/bin" path_if "$HOME/.local/bin"
unset -f source_if unset -f source_if
unset -f path_if unset -f path_if
if command -V gnome-keyring-daemon > /dev/null; then if has gnome-keyring-daemon; then
eval "$(gnome-keyring-daemon --start)" eval "$(gnome-keyring-daemon --start)"
export SSH_AUTH_SOCK export SSH_AUTH_SOCK
fi fi