commit a1a40c360dd5e9f5d2091ded2be80f43aeb75dcd (tree)
parent e250f9730ef3456ed46be57e54fe9cdb0e4b00c1
Author: Tim Pope <code@tpope.net>
Date: Thu, 11 Jul 2019 09:23:39 -0400
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.
Diffstat:
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git 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',<bang>0,<q-args>)")
+call s:command("-bar -bang -nargs=? -complete=customlist,s:GrepComplete Gcgrep :execute s:Grep('c',<bang>0,<q-args>)")
call s:command("-bar -bang -nargs=? -complete=customlist,s:GrepComplete Glgrep :execute s:Grep('l',<bang>0,<q-args>)")
call s:command("-bar -bang -nargs=? -range=-1 -complete=customlist,s:LogComplete Glog :exe s:Log('c',<bang>0,<line1>,<count>,<q-args>)")
+call s:command("-bar -bang -nargs=? -range=-1 -complete=customlist,s:LogComplete Gclog :exe s:Log('c',<bang>0,<line1>,<count>,<q-args>)")
call s:command("-bar -bang -nargs=? -range=-1 -complete=customlist,s:LogComplete Gllog :exe s:Log('l',<bang>0,<line1>,<count>,<q-args>)")
" Section: :Gedit, :Gpedit, :Gsplit, :Gvsplit, :Gtabedit, :Gread
diff --git 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.