AutoYADM commit: 2025-04-18 18:15:05
This commit is contained in:
parent
818a04a047
commit
d473a0a6c4
9 changed files with 332 additions and 1 deletions
20
.config/fish/functions/_nvm_index_update.fish
Normal file
20
.config/fish/functions/_nvm_index_update.fish
Normal file
|
@ -0,0 +1,20 @@
|
|||
function _nvm_index_update
|
||||
test ! -d $nvm_data && command mkdir -p $nvm_data
|
||||
|
||||
set --local index $nvm_data/.index
|
||||
|
||||
if not command curl -q --location --silent $nvm_mirror/index.tab >$index.temp
|
||||
command rm -f $index.temp
|
||||
echo "nvm: Can't update index, host unavailable: \"$nvm_mirror\"" >&2
|
||||
return 1
|
||||
end
|
||||
|
||||
command awk -v OFS=\t '
|
||||
/v0.9.12/ { exit } # Unsupported
|
||||
NR > 1 {
|
||||
print $1 (NR == 2 ? " latest" : $10 != "-" ? " lts/" tolower($10) : "")
|
||||
}
|
||||
' $index.temp >$index
|
||||
|
||||
command rm -f $index.temp
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue