From d488a7090fddc05152ee9e493837bf03d937dbf4 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Fri, 3 Sep 2021 11:12:34 -0400 Subject: [PATCH] Add >/ and >:/ as work-tree version expansions Not sure I want to waste the easy to type ">" on the work tree version, so adding some alternatives. --- autoload/fugitive.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index bde1f02..45a67c2 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -1868,7 +1868,7 @@ endfunction function! s:Expand(rev, ...) abort if a:rev =~# '^>\=:[0-3]$' let file = len(expand('%')) ? a:rev[-2:-1] . ':%' : '%' - elseif a:rev ==# '>' + elseif a:rev =~# '^>\%(:\=/\)\=$' let file = '%' elseif a:rev ==# '>:' let file = empty(s:DirCommitFile(@%)[0]) ? ':0:%' : '%'