dotfiles/home/.zsh/cmd/vmc.sh
2019-08-26 21:21:50 +03:00

19 lines
448 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