Skip to content

Commit 41a72e2

Browse files
committed
Escape # and % passed to &grepprg
Fixes rking#67
1 parent f183a34 commit 41a72e2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugin/ack.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ function! s:Ack(cmd, args)
5252
try
5353
let &grepprg=g:ackprg
5454
let &grepformat=g:ackformat
55-
silent execute a:cmd . " " . escape(l:grepargs, '|')
55+
" NOTE: we escape special chars, but not everything using shellescape to
56+
" allow for passing arguments etc
57+
silent execute a:cmd . " " . escape(l:grepargs, '|#%')
5658
finally
5759
let &grepprg=grepprg_bak
5860
let &grepformat=grepformat_bak

0 commit comments

Comments
 (0)