6
6
" Version: 36
7
7
" Installing: :help glvs-install
8
8
" Usage: :help glvs
9
+ " Last Change: {{{1
10
+ " 2024 Sep 08 by Vim Project: several small fixes
11
+ " }}}
9
12
"
10
13
" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim
11
14
" redraw!|call inputsave()|call input("Press <cr> to continue")|call inputrestore()
@@ -64,7 +67,7 @@ if !exists("g:GetLatestVimScripts_options")
64
67
if g: GetLatestVimScripts_wget == " wget"
65
68
let g: GetLatestVimScripts_options= " -q -O"
66
69
elseif g: GetLatestVimScripts_wget == " curl"
67
- let g: GetLatestVimScripts_options= " -s -O "
70
+ let g: GetLatestVimScripts_options= " -s -o "
68
71
else
69
72
let g: GetLatestVimScripts_options= " "
70
73
endif
77
80
78
81
" set up default scriptaddr address
79
82
if ! exists (" g:GetLatestVimScripts_scriptaddr" )
80
- let g: GetLatestVimScripts_scriptaddr = ' http://vim.sourceforge.net/script.php?script_id='
83
+ let g: GetLatestVimScripts_scriptaddr = ' https://www.vim.org/scripts/script.php?script_id='
84
+ endif
85
+
86
+ if ! exists (" g:GetLatestVimScripts_downloadaddr" )
87
+ let g: GetLatestVimScripts_downloadaddr = ' https://www.vim.org/scripts/download_script.php?src_id='
81
88
endif
82
89
83
90
" " For debugging:
@@ -89,11 +96,11 @@ endif
89
96
let s: autoinstall= " "
90
97
if g: GetLatestVimScripts_allowautoinstall
91
98
92
- if (has (" win32" ) || has (" gui_win32" ) || has (" gui_win32s" ) || has (" win16" ) || has (" win64" ) || has (" win32unix" ) || has (" win95" )) && &shell != " bash "
99
+ if (has (" win32" ) || has (" gui_win32" ) || has (" gui_win32s" ) || has (" win16" ) || has (" win64" ) || has (" win32unix" ) || has (" win95" )) && &shell !~ ' \cbash\|pwsh\|powershell '
93
100
" windows (but not cygwin/bash)
94
101
let s: dotvim= " vimfiles"
95
102
if ! exists (" g:GetLatestVimScripts_mv" )
96
- let g: GetLatestVimScripts_mv= " ren "
103
+ let g: GetLatestVimScripts_mv= " move "
97
104
endif
98
105
99
106
else
@@ -208,9 +215,10 @@ fun! getscript#GetLatestVimScripts()
208
215
" call Decho("searching plugins for GetLatestVimScripts dependencies")
209
216
let lastline = line (" $" )
210
217
" call Decho("lastline#".lastline)
211
- let firstdir = substitute (&rtp ,' ,.* $' ,' ' ,' ' )
218
+ let firstdir = substitute (&rtp ,' ,.{-} $' ,' ' ,' ' )
212
219
let plugins = split (globpath (firstdir," plugin/**/*.vim" ),' \n' )
213
- let plugins = plugins + split (globpath (firstdir," AsNeeded/**/*.vim" ),' \n' )
220
+ let plugins += split (globpath (firstdir," ftplugin/**/*.vim" ),' \n' )
221
+ let plugins += split (globpath (firstdir," AsNeeded/**/*.vim" ),' \n' )
214
222
let foundscript = 0
215
223
216
224
" this loop updates the GetLatestVimScripts.dat file
@@ -515,11 +523,11 @@ fun! s:GetOneScript(...)
515
523
" call Decho(".downloading new <".sname.">")
516
524
echomsg " .downloading new <" .sname." >"
517
525
if has (" win32" ) || has (" win16" ) || has (" win95" )
518
- " call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id=' .latestsrcid)."|q")
519
- new |exe " silent r!" .g: GetLatestVimScripts_wget ." " .g: GetLatestVimScripts_options ." " .shellescape (sname)." " .shellescape (' http://vim.sourceforge.net/scripts/download_script.php?src_id= ' .latestsrcid)|q
526
+ " call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr .latestsrcid)."|q")
527
+ new |exe " silent r!" .g: GetLatestVimScripts_wget ." " .g: GetLatestVimScripts_options ." " .shellescape (sname)." " .shellescape (g: GetLatestVimScripts_downloadaddr .latestsrcid)|q
520
528
else
521
- " call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='))
522
- exe " silent !" .g: GetLatestVimScripts_wget ." " .g: GetLatestVimScripts_options ." " .shellescape (sname)." " .shellescape (' http://vim.sourceforge.net/scripts/download_script.php?src_id= ' ).latestsrcid
529
+ " call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr).latestsrcid
530
+ exe " silent !" .g: GetLatestVimScripts_wget ." " .g: GetLatestVimScripts_options ." " .shellescape (sname)." " .shellescape (g: GetLatestVimScripts_downloadaddr ).latestsrcid
523
531
endif
524
532
525
533
" --------------------------------------------------------------------------
@@ -573,7 +581,7 @@ fun! s:GetOneScript(...)
573
581
" call Decho("no decompression needed")
574
582
endif
575
583
576
- " distribute archive(.zip, .tar, .vba, ...) contents
584
+ " distribute archive(.zip, .tar, .vba, .vmb, . ..) contents
577
585
if sname = ~ ' \.zip$'
578
586
" call Decho("dearchive: attempt to unzip ".sname)
579
587
exe " silent !unzip -o " .shellescape (sname)
@@ -592,7 +600,7 @@ fun! s:GetOneScript(...)
592
600
elseif sname = ~ ' \.txz$'
593
601
" call Decho("dearchive: attempt to untar+xz ".sname)
594
602
exe " silent !tar -Jxvf " .shellescape (sname)
595
- elseif sname = ~ ' \.vba$'
603
+ elseif sname = ~ ' \.vba$\|\.vmb$ '
596
604
" call Decho("dearchive: attempt to handle a vimball: ".sname)
597
605
silent 1 split
598
606
if exists (" g:vimball_home" )
0 commit comments