dotfiles/home/.zsh/cmd/vmc.sh
2019-12-28 18:28:55 +03:00

19 lines
450 B
Bash
Executable File

### ASDF
# mnemonic [V]ersion [M]anager [C]lean
# uninstall multiple languages at once, async
lang=${1}
if [[ -z $lang ]]; then
lang=$(asdf plugin-list | eval "fzf ${FZF_DEFAULT_OPTS} -m --header='[asdf:clean]'")
fi
if [[ $lang ]]; then
for lng in $(echo $lang); do
for version in $(asdf list $lng | sort -nrk1,1 | eval "fzf ${FZF_DEFAULT_OPTS} -m --header='[asdf:${lng}:clean]'")
do asdf uninstall $lng $version
done
done
fi