zsh: Load ASDF if it exists
This commit is contained in:
parent
6168d56e82
commit
e267cd31bf
1 changed files with 9 additions and 1 deletions
10
etc/profile
10
etc/profile
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue