bugfix: tweaks for asdf usage
parent
f1eb889823
commit
374dca7fb2
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue