1
0
Fork 0
mirror of https://github.com/SeriousBug/dotfiles synced 2024-11-14 08:47:29 -06:00
dotfiles/fish/functions/_nvm_list.fish

12 lines
378 B
Fish
Raw Normal View History

2022-03-06 21:42:47 -06:00
function _nvm_list
set --local versions $nvm_data/*
set --query versions[1] &&
string match --entire --regex -- (string match --regex -- "v\d.+" $versions |
string escape --style=regex |
string join "|"
) <$nvm_data/.index
command --all node |
string match --quiet --invert --regex -- "^$nvm_data" && echo system
end