From 8d584c199a34ee47079b39052c7679f2511f53ad Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 19 Jul 2019 11:57:16 -0400 Subject: [PATCH] Fix escaping for :Ggrep '#' --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 90df43b..e73b16a 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -3470,7 +3470,7 @@ function! s:Grep(type, bang, arg) abort let title = [listnr < 0 ? ':Ggrep' : ':Glgrep'] + args call s:QuickfixCreate(listnr, {'title': (listnr < 0 ? ':Ggrep ' : ':Glgrep ') . s:fnameescape(args)}) let tempfile = tempname() - exe '!' . s:shellesc(cmd + args) + exe '!' . escape(s:shellesc(cmd + args), '%#!') \ printf(&shellpipe . (&shellpipe =~# '%s' ? '' : ' %s'), s:shellesc(tempfile)) let list = map(readfile(tempfile), 's:GrepParseLine(prefix, name_only, dir, v:val)') call s:QuickfixSet(listnr, list, 'a')