| 1 | function _nvm_list |
| 2 | set --local versions $nvm_data/* |
| 3 | set --query versions[1] && |
| 4 | string match --entire --regex -- (string match --regex -- "v\d.+" $versions | |
| 5 | string escape --style=regex | |
| 6 | string join "|" |
| 7 | ) <$nvm_data/.index |
| 8 | |
| 9 | command --all node | |
| 10 | string match --quiet --invert --regex -- "^$nvm_data" && echo system |
| 11 | end |