Skip to content

Commit

Permalink
Fix version number regex in completions (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
DomParfitt authored Jun 29, 2022
1 parent 8151157 commit 8bbe2d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions completions/nvm.fish
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

function __nvm_complete_ls_remote
if not test "$__nvm_ls_remote"
set -g __nvm_ls_remote (nvm ls-remote | grep -Po '(?:iojs-)?v[0-9]\.[0-9]\.[0-9]*')
set -g __nvm_ls_remote (nvm ls-remote | grep -Po '(?:iojs-)?v[0-9]+\.[0-9]+\.[0-9]+')
end

printf "%s\n" $__nvm_ls_remote
end

function __nvm_complete_ls
if not test "$__nvm_ls"
set -g __nvm_ls (nvm ls | grep -Po '[[:space:]].\K(v[0-9]\.[0-9]\.[0-9]*)')
set -g __nvm_ls (nvm ls | grep -Po '[[:space:]].\K(v[0-9]+\.[0-9]+\.[0-9]+)')
end

printf "%s\n" $__nvm_ls
Expand Down

0 comments on commit 8bbe2d6

Please sign in to comment.