Skip to content

Instantly share code, notes, and snippets.

@mattn
Created June 5, 2012 04:26
Show Gist options
  • Save mattn/2872632 to your computer and use it in GitHub Desktop.
Save mattn/2872632 to your computer and use it in GitHub Desktop.
diff --git a/autoload/quickrun/module.vim b/autoload/quickrun/module.vim
index e81fab5..ef45604 100644
--- a/autoload/quickrun/module.vim
+++ b/autoload/quickrun/module.vim
@@ -33,6 +33,9 @@ function! s:templates.runner.run(commands, input, session)
throw 'quickrun: A runner should implements run()'
endfunction
function! s:templates.runner.shellescape(str)
+ if a:str !~ '\n'
+ return a:str
+ endif
if s:is_cmd_exe()
return '^"' . substitute(substitute(substitute(a:str,
\ '[&|<>()^"%]', '^\0', 'g'),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment