async: correctly redirect error on powershell

This commit is contained in:
Christian Brabandt 2020-01-28 16:01:52 +01:00
parent 2e9d36e220
commit a201689e38
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09

View File

@ -367,8 +367,10 @@ endfunction
function! airline#async#vim7_vcs_clean(cmd, file, vcs)
" Vim pre 8, fallback using system()
" don't want to to see error messages
if g:airline#init#is_windows && &shell =~ 'cmd\|powershell'
if g:airline#init#is_windows && &shell =~ 'cmd'
let cmd = a:cmd .' 2>nul'
elseif g:airline#init#is_windows && &shell =~ 'powerline'
let cmd = a:cmd .' 2> $null'
else
let cmd = a:cmd .' 2>/dev/null'
endif