Skip to content

Commit

Permalink
Fix regex pattern in _nvm_list to correctly match version directory n…
Browse files Browse the repository at this point in the history
…ames (#227)

Update _nvm_list to correctly match version directory names by subtracting $nvm_path

Fix #226
  • Loading branch information
NV4RE authored Sep 9, 2024
1 parent b8edb1e commit 46586c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion functions/_nvm_list.fish
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
function _nvm_list
set --local versions $nvm_data/*
set --local versions (string replace --all -- $nvm_data/ "" $nvm_data/*)

set --query versions[1] &&
string match --entire --regex -- (string match --regex -- "v\d.+" $versions |
string escape --style=regex |
Expand Down

0 comments on commit 46586c4

Please sign in to comment.