diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 57cdc67..59731ef 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -4172,6 +4172,11 @@ function! s:GrepSubcommand(line1, line2, range, bang, mods, options) abort endif endfunction +function! fugitive#GrepCommand(line1, line2, range, bang, mods, arg) abort + return fugitive#Command(a:line1, a:line2, a:range, a:bang, a:mods, + \ "grep -O " . a:arg) +endfunction + let s:log_diff_context = '{"filename": fugitive#Find(v:val . from, a:dir), "lnum": get(offsets, v:key), "module": strpart(v:val, 0, len(a:state.base_module)) . from}' function! s:LogFlushQueue(state, dir) abort diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index 21577de..2b9e4d9 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -437,9 +437,9 @@ unlet s:cmd exe "command! -bar -bang -nargs=? -complete=customlist,fugitive#CdComplete Gcd exe fugitive#Cd(, 0)" exe "command! -bar -bang -nargs=? -complete=customlist,fugitive#CdComplete Glcd exe fugitive#Cd(, 1)" -exe 'command! -bang -nargs=? -range=-1' s:addr_wins '-complete=customlist,fugitive#GrepComplete Ggrep exe fugitive#Command(, , +"", 0, "", "grep -O " . )' -exe 'command! -bang -nargs=? -range=-1' s:addr_wins '-complete=customlist,fugitive#GrepComplete Gcgrep exe fugitive#Command(, , +"", 0, "", "grep -O " . )' -exe 'command! -bang -nargs=? -range=-1' s:addr_wins '-complete=customlist,fugitive#GrepComplete Glgrep exe fugitive#Command(0, > 0 ? : 0, +"", 0, "", "grep -O " . )' +exe 'command! -bang -nargs=? -range=-1' s:addr_wins '-complete=customlist,fugitive#GrepComplete Ggrep exe fugitive#GrepCommand(, , +"", 0, "", )' +exe 'command! -bang -nargs=? -range=-1' s:addr_wins '-complete=customlist,fugitive#GrepComplete Gcgrep exe fugitive#GrepCommand(, , +"", 0, "", )' +exe 'command! -bang -nargs=? -range=-1' s:addr_wins '-complete=customlist,fugitive#GrepComplete Glgrep exe fugitive#GrepCommand(0, > 0 ? : 0, +"", 0, "", )' exe 'command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#LogComplete Glog :exe fugitive#LogCommand(,,+"",0,"",, "")' exe 'command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#LogComplete Gclog :exe fugitive#LogCommand(,,+"",0,"",, "c")'