From 6babcbd8841335a3c25ec960ff57ab9a139c9073 Mon Sep 17 00:00:00 2001 From: alexandregv Date: Thu, 6 May 2021 19:02:37 +0200 Subject: [PATCH] feat(asdf): add support for archlinux/AUR package (#9893) Closes #9893 --- plugins/asdf/asdf.plugin.zsh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/asdf/asdf.plugin.zsh b/plugins/asdf/asdf.plugin.zsh index da53eef8e..3016282c6 100644 --- a/plugins/asdf/asdf.plugin.zsh +++ b/plugins/asdf/asdf.plugin.zsh @@ -2,6 +2,12 @@ ASDF_DIR="${ASDF_DIR:-$HOME/.asdf}" ASDF_COMPLETIONS="$ASDF_DIR/completions" +# If not found, check for archlinux/AUR package (/opt/asdf-vm/) +if [[ ! -f "$ASDF_DIR/asdf.sh" || ! -f "$ASDF_COMPLETIONS/asdf.bash" ]] && [[ -f "/opt/asdf-vm/asdf.sh" ]]; then + ASDF_DIR="/opt/asdf-vm" + ASDF_COMPLETIONS="$ASDF_DIR" +fi + # If not found, check for Homebrew package if [[ ! -f "$ASDF_DIR/asdf.sh" || ! -f "$ASDF_COMPLETIONS/asdf.bash" ]] && (( $+commands[brew] )); then brew_prefix="$(brew --prefix asdf)"