Skip to content

Commit

Permalink
Faster _nvm_find_up via string builtin (#188)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgebucaran authored Jun 9, 2022
1 parent 2d3c97e commit ae1e745
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/nvm.fish
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ end

function _nvm_find_up --argument-names path file
test -e "$path/$file" && echo $path/$file || begin
test "$path" != / || return
_nvm_find_up (command dirname $path) $file
test ! -z "$path" || return
_nvm_find_up (string replace --regex -- '/[^/]*$' "" $path) $file
end
end

Expand Down

0 comments on commit ae1e745

Please sign in to comment.