From fbe9281190682ca7c2523c3307c91c09698a14a2 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Tue, 12 Nov 2013 04:14:20 +0100 Subject: [PATCH] Escape `#` and `%` passed to &grepprg Fixes #67 --- plugin/ack.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugin/ack.vim b/plugin/ack.vim index d898b3a0..ff97f5da 100644 --- a/plugin/ack.vim +++ b/plugin/ack.vim @@ -52,7 +52,9 @@ function! s:Ack(cmd, args) try let &grepprg=g:ackprg let &grepformat=g:ackformat - silent execute a:cmd . " " . escape(l:grepargs, '|') + " NOTE: we escape special chars, but not everything using shellescape to + " allow for passing arguments etc + silent execute a:cmd . " " . escape(l:grepargs, '|#%') finally let &grepprg=grepprg_bak let &grepformat=grepformat_bak