Fix Ruby nREPL connection on Windows

I do not understand why tripling quotes escapes them.

Closes #41.
This commit is contained in:
Tim Pope 2013-01-19 23:10:33 -05:00
parent c0bdf9b971
commit cd54b73e88

View File

@ -69,7 +69,7 @@ function! s:shellesc(arg) abort
if a:arg =~ '^[A-Za-z0-9_/.-]\+$' if a:arg =~ '^[A-Za-z0-9_/.-]\+$'
return a:arg return a:arg
elseif &shell =~# 'cmd' elseif &shell =~# 'cmd'
return '"'.substitute(substitute(a:arg, '"', '""', 'g'), '%', '"%"', 'g').'"' return '"'.substitute(substitute(a:arg, '"', '""""', 'g'), '%', '"%"', 'g').'"'
else else
let escaped = shellescape(a:arg) let escaped = shellescape(a:arg)
if &shell =~# 'sh' && &shell !~# 'csh' if &shell =~# 'sh' && &shell !~# 'csh'