From a1a40c360dd5e9f5d2091ded2be80f43aeb75dcd Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Thu, 11 Jul 2019 09:23:39 -0400 Subject: [PATCH] Provide :Gclog and :Gcgrep aliases The distant future might hold a :Glog command that isn't bound by the limitations of the quickfix list, so introduce an alias for the quickfix variant to retire to. :Gcgrep is a weird name since it directly maps to :grep, but provide it anyways for symmetry. --- autoload/fugitive.vim | 2 ++ doc/fugitive.txt | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index e5b4dcd..554ae83 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -3502,8 +3502,10 @@ function! s:Log(type, bang, line1, count, args) abort endfunction call s:command("-bar -bang -nargs=? -complete=customlist,s:GrepComplete Ggrep :execute s:Grep('c',0,)") +call s:command("-bar -bang -nargs=? -complete=customlist,s:GrepComplete Gcgrep :execute s:Grep('c',0,)") call s:command("-bar -bang -nargs=? -complete=customlist,s:GrepComplete Glgrep :execute s:Grep('l',0,)") call s:command("-bar -bang -nargs=? -range=-1 -complete=customlist,s:LogComplete Glog :exe s:Log('c',0,,,)") +call s:command("-bar -bang -nargs=? -range=-1 -complete=customlist,s:LogComplete Gclog :exe s:Log('c',0,,,)") call s:command("-bar -bang -nargs=? -range=-1 -complete=customlist,s:LogComplete Gllog :exe s:Log('l',0,,,)") " Section: :Gedit, :Gpedit, :Gsplit, :Gvsplit, :Gtabedit, :Gread diff --git a/doc/fugitive.txt b/doc/fugitive.txt index 7a7a569..c39f24e 100644 --- a/doc/fugitive.txt +++ b/doc/fugitive.txt @@ -66,13 +66,13 @@ that are part of Git repositories). *fugitive-:Gfetch* :Gfetch [args] Like |:Gpush|, but for git-fetch. - *fugitive-:Ggrep* + *fugitive-:Ggrep* *fugitive-:Gcgrep* :Ggrep[!] [args] |:grep|[!] with git-grep as 'grepprg'. *fugitive-:Glgrep* :Glgrep[!] [args] |:lgrep|[!] with git-grep as 'grepprg'. - *fugitive-:Glog* + *fugitive-:Glog* *fugitive-:Gclog* :Glog[!] [args] Use git-log [args] to load the commit history into the |quickfix| list. Jump to the first commit unless [!] is given.