Skip to content

Instantly share code, notes, and snippets.

function nvm
if [ -z $argv[1] ]
bash -lic 'nvm'
# setting the path for default version
fish_add_path -m $(bash -lic 'dirname `nvm which default`')
else if [ $argv[1] = use ]
# setting the path for version $argv[2]
fish_add_path -m $(bash -lic "dirname `nvm which $argv[2]`")
else
# executing command $argv[1]