Created
June 5, 2012 04:26
-
-
Save mattn/2872632 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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