forked from luna/vim-rana-local
rename EscapeArg to SanitizeArg
This commit is contained in:
parent
c9f0c2590d
commit
d692e95e6e
1 changed files with 5 additions and 3 deletions
|
@ -221,8 +221,10 @@ let s:VERSION = '7.0.7'
|
||||||
return expand("%:p")
|
return expand("%:p")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:EscapeArg(arg)
|
function! s:SanitizeArg(arg)
|
||||||
return substitute(shellescape(a:arg), '!', '\\!', '')
|
let sanitized = shellescape(a:arg)
|
||||||
|
let sanitized = substitute(sanitized, '!', '\\!', '')
|
||||||
|
return sanitized
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! s:JsonEscape(str)
|
function! s:JsonEscape(str)
|
||||||
|
@ -232,7 +234,7 @@ let s:VERSION = '7.0.7'
|
||||||
function! s:JoinArgs(args)
|
function! s:JoinArgs(args)
|
||||||
let safeArgs = []
|
let safeArgs = []
|
||||||
for arg in a:args
|
for arg in a:args
|
||||||
let safeArgs = safeArgs + [s:EscapeArg(arg)]
|
let safeArgs = safeArgs + [s:SanitizeArg(arg)]
|
||||||
endfor
|
endfor
|
||||||
return join(safeArgs, ' ')
|
return join(safeArgs, ' ')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
Loading…
Reference in a new issue