From 8d3f3e498752fda14f4d1d396efe5d59af921811 Mon Sep 17 00:00:00 2001 From: Nanda Lopes Date: Thu, 11 Mar 2021 14:19:39 -0300 Subject: [PATCH] ASDF example that works on linux and macos --- Examples.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Examples.md b/Examples.md index c2f65e1..1dfa596 100644 --- a/Examples.md +++ b/Examples.md @@ -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;