From 46586c48f5bca1f16581d72531b89e7c1630898a Mon Sep 17 00:00:00 2001 From: NV4RE Date: Tue, 10 Sep 2024 01:00:15 +0700 Subject: [PATCH] Fix regex pattern in _nvm_list to correctly match version directory names (#227) Update _nvm_list to correctly match version directory names by subtracting $nvm_path Fix #226 --- functions/_nvm_list.fish | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/functions/_nvm_list.fish b/functions/_nvm_list.fish index fb5ab0e..a17e1a9 100644 --- a/functions/_nvm_list.fish +++ b/functions/_nvm_list.fish @@ -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 |