m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 00:03:39 -05:00

ASDF example that works on linux and macos

Nanda Lopes
2021-03-11 14:19:39 -03:00
parent 816142bf26
commit 8d3f3e4987

@@ -888,12 +888,18 @@ To search for windows and show which is currently active, add [ftwind](https://g
vmi() {
local lang=${1}
if [[ $platform == 'linux' ]]; then
local tac="tac"
elif [[ $platform == 'darwin' ]]; then
local tac="tail -r"
fi
if [[ ! $lang ]]; then
lang=$(asdf plugin-list | fzf)
fi
if [[ $lang ]]; then
local versions=$(asdf list-all $lang | tail -r | fzf -m)
local versions=$(asdf list-all $lang | $tac | fzf --multi)
if [[ $versions ]]; then
for version in $(echo $versions);
do; asdf install $lang $version; done;