bugfix: tweaks for asdf usage

pull/8/head
Adam Veldhousen 2021-10-28 20:12:01 -05:00
parent f1eb889823
commit 374dca7fb2
Signed by: adam
GPG Key ID: 6DB29003C6DD1E4B
4 changed files with 22 additions and 2 deletions

View File

@ -4,6 +4,8 @@
export FILES_ROOT="${HOME}/.files";
# Set plugins to load here. Run files_plugins_list to see available plugins.
export FILES_PLUGINS=("brew" "ssh" "vim" "git-extras" "asdf" "helm" "starship" "extras");
export FILES_PLUGINS=("asdf" "ssh" "vim" "git-extras" "kubectl" "helm" "starship" "extras");
[[ -s "${HOME}/.files/sourceme.sh" ]] && source ${HOME}/.files/sourceme.sh;
starship_run bash

View File

@ -17,3 +17,19 @@ fi
alias asdf_list_all='asdf plugin list all';
alias asdf_add='asdf plugin add';
alias asdf_list_versions='asdf list all';
# adds a plugin @ a version, installs and uses it
asdf_use() {
local plugin=${1};
local version=${2:-'latest'};
if [[ -z "${plugin}" ]]; then
echo "usage: asdf_use <plugin> [version]"
fi
asdf plugin add ${plugin};
asdf install ${plugin} ${version};
asdf local ${plugin} ${version};
}

View File

@ -4,6 +4,7 @@ HELM_VERSION=${HELM_VERSION:-"latest"};
if ! [[ -f "$(which helm 2>&1)" ]] && [[ -d "${HOME}/.asdf" ]]; then
asdf plugin add helm;
asdf install helm ${HELM_VERSION};
asdf local helm ${HELM_VERSION};
fi
if [[ -f "$(which helm 2>&1)" ]]; then

View File

@ -4,7 +4,8 @@ STARSHIP_VERSION=${STARSHIP_VERSION:-"latest"};
if ! [[ -f "$(which starship 2>&1)" ]] && [[ -d "${HOME}/.asdf" ]]; then
asdf plugin add starship;
asdf install startship ${STARSHIP_VERSION};
asdf install starship ${STARSHIP_VERSION};
asdf local starship ${STARSHIP_VERSION};
fi
if [[ -f "$(which starship 2>&1)" ]]; then