mirror of
https://github.com/junegunn/vim-plug.git
synced 2024-12-23 20:45:31 -07:00
Fix PlugClean when &shell is powershell on Windows (#1283)
This commit is contained in:
parent
db37a8a29a
commit
b98b66242b
5
plug.vim
5
plug.vim
@ -2281,7 +2281,10 @@ endfunction
|
|||||||
|
|
||||||
function! s:with_cd(cmd, dir, ...)
|
function! s:with_cd(cmd, dir, ...)
|
||||||
let script = a:0 > 0 ? a:1 : 1
|
let script = a:0 > 0 ? a:1 : 1
|
||||||
return printf('cd%s %s && %s', s:is_win ? ' /d' : '', plug#shellescape(a:dir, {'script': script}), a:cmd)
|
let pwsh = s:is_powershell(&shell)
|
||||||
|
let cd = s:is_win && !pwsh ? 'cd /d' : 'cd'
|
||||||
|
let sep = pwsh ? ';' : '&&'
|
||||||
|
return printf('%s %s %s %s', cd, plug#shellescape(a:dir, {'script': script, 'shell': &shell}), sep, a:cmd)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:system(cmd, ...)
|
function! s:system(cmd, ...)
|
||||||
|
Loading…
Reference in New Issue
Block a user