#549 Temporarily revert shell escaping changes, just for Windows

This commit is contained in:
w0rp
2017-05-12 09:20:16 +01:00
parent fa54f7af97
commit 07b2542c0d
30 changed files with 51 additions and 40 deletions

View File

@@ -123,3 +123,14 @@ function! ale#Var(buffer, variable_name) abort
return getbufvar(str2nr(a:buffer), l:full_name, g:[l:full_name])
endfunction
" Escape a string suitably for each platform.
" shellescape() does not work on Windows.
function! ale#Escape(str) abort
if fnamemodify(&shell, ':t') ==? 'cmd.exe'
" FIXME: Fix shell escaping for Windows.
return fnameescape(a:str)
else
return shellescape(a:str)
endif
endfunction