mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-13 22:03:51 -05:00
Fix escaping for :Ggrep '#'
This commit is contained in:
@@ -3470,7 +3470,7 @@ function! s:Grep(type, bang, arg) abort
|
|||||||
let title = [listnr < 0 ? ':Ggrep' : ':Glgrep'] + args
|
let title = [listnr < 0 ? ':Ggrep' : ':Glgrep'] + args
|
||||||
call s:QuickfixCreate(listnr, {'title': (listnr < 0 ? ':Ggrep ' : ':Glgrep ') . s:fnameescape(args)})
|
call s:QuickfixCreate(listnr, {'title': (listnr < 0 ? ':Ggrep ' : ':Glgrep ') . s:fnameescape(args)})
|
||||||
let tempfile = tempname()
|
let tempfile = tempname()
|
||||||
exe '!' . s:shellesc(cmd + args)
|
exe '!' . escape(s:shellesc(cmd + args), '%#!')
|
||||||
\ printf(&shellpipe . (&shellpipe =~# '%s' ? '' : ' %s'), s:shellesc(tempfile))
|
\ printf(&shellpipe . (&shellpipe =~# '%s' ? '' : ' %s'), s:shellesc(tempfile))
|
||||||
let list = map(readfile(tempfile), 's:GrepParseLine(prefix, name_only, dir, v:val)')
|
let list = map(readfile(tempfile), 's:GrepParseLine(prefix, name_only, dir, v:val)')
|
||||||
call s:QuickfixSet(listnr, list, 'a')
|
call s:QuickfixSet(listnr, list, 'a')
|
||||||
|
|||||||
Reference in New Issue
Block a user