Skip to content

asdf wrapper to handle partial (fuzzy, best-matching) version strings. 🦩

Notifications You must be signed in to change notification settings

valeriangalliat/asdf-partial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

🦩 asdf-partial

asdf wrapper to handle partial (fuzzy, best-matching) version strings.

Overview

By default asdf doesn't support partial version matching.

This means you can't asdf install nodejs 18 and have it install the latest matching version e.g. 18.3.0. Same goes for asdf global, asdf local and asdf shell.

asdf-partial wraps asdf to provide partial version match for those commands.

$ asdf install nodejs 18
Trying to update node-build... ok
node-build: definition not found: 18

$ git clone https://github.com/valeriangalliat/asdf-partial ~/.asdf/asdf-partial
$ export PATH=~/.asdf/asdf-partial:$PATH

$ asdf install nodejs 18
Trying to update node-build... ok
Downloading node-v18.3.0.tar.gz...
-> https://nodejs.org/dist/v18.3.0/node-v18.3.0.tar.gz
Installing node-v18.3.0...
Installed node-v18.3.0 to ~/.asdf/installs/nodejs/18.3.0

$ asdf shell nodejs 18
$ node --version
v18.3.0

$ asdf list nodejs
  18.1.0
  18.3.0

$ asdf shell nodejs 18.1
$ node --version
v18.1.0

$ asdf shell nodejs 18.2
No compatible versions installed (nodejs 18.2)

Installation

git clone https://github.com/valeriangalliat/asdf-partial ~/.asdf/asdf-partial

Then in your ~/.zshrc or ~/.bashrc or equivalent, after the line where you source ~/.asdf/asdf.sh, add the following:

export PATH=~/.asdf/asdf-partial:$PATH

About

asdf wrapper to handle partial (fuzzy, best-matching) version strings. 🦩

Resources

Stars

Watchers

Forks

Languages