From b1536652591c20152ce4dc55651e586dfd3dc4dd Mon Sep 17 00:00:00 2001 From: Chris Toomey Date: Sat, 24 Nov 2012 10:10:44 -0500 Subject: [PATCH] Escape commands passed in via SendCommand function --- plugin/vim-tmux-runner.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/vim-tmux-runner.vim b/plugin/vim-tmux-runner.vim index edebbdf..eaef096 100644 --- a/plugin/vim-tmux-runner.vim +++ b/plugin/vim-tmux-runner.vim @@ -5,6 +5,7 @@ " TODO: create pane if not already available when running sendcommand " TODO: reattach pane rather than create if s:detach_window is set " TODO: normalize naming, 'runner' not 'pane' +" TODO: update the clear sequence to use '^U^L' function! s:InitVariable(var, value) if !exists(a:var) @@ -243,7 +244,8 @@ function! s:DefineKeymaps() endfunction function! VTRSendCommand(command) - call s:SendKeys(a:command) + let escaped_command = shellescape(a:command) + call s:SendKeys(escaped_command) endfunction call s:InitializeVariables()