diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index ec85721..5d1fa9f 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -425,7 +425,7 @@ if exists(':Gstatus') !=# 2 endif for s:cmd in ['Commit', 'Revert', 'Merge', 'Rebase', 'Pull', 'Push', 'Fetch', 'Blame'] - if exists(':G' . tolower(s:cmd)) != 2 + if exists(':G' . tolower(s:cmd)) != 2 && get(g:, 'fugitive_legacy_commands', 1) exe 'command! -bang -nargs=? -range=-1 -complete=customlist,fugitive#' . s:cmd . 'Complete G' . tolower(s:cmd) \ 'echohl WarningMSG|echo ":G' . tolower(s:cmd) . ' is deprecated in favor of :Git ' . tolower(s:cmd) . '\n"|echohl NONE|' \ 'exe fugitive#Command(, , +"", 0, "", "' . tolower(s:cmd) . ' " . )' @@ -470,21 +470,21 @@ exe 'command! -bar -bang -nargs=0 -complete=customlist,fugitive#CompleteObject G exe 'command! -bar -bang -nargs=0 -complete=customlist,fugitive#CompleteObject GDelete exe fugitive#DeleteCommand(, , +"", 0, "", , [])' exe 'command! -bar -bang -nargs=1 -complete=customlist,fugitive#CompleteObject GMove exe fugitive#MoveCommand( , , +"", 0, "", , [])' exe 'command! -bar -bang -nargs=1 -complete=customlist,fugitive#RenameComplete GRename exe fugitive#RenameCommand(, , +"", 0, "", , [])' -if exists(':Gremove') != 2 +if exists(':Gremove') != 2 && get(g:, 'fugitive_legacy_commands', 1) exe 'command! -bar -bang -nargs=0 -complete=customlist,fugitive#CompleteObject Gremove exe fugitive#RemoveCommand(, , +"", 0, "", , [])' endif -if exists(':Gdelete') != 2 +if exists(':Gdelete') != 2 && get(g:, 'fugitive_legacy_commands', 1) exe 'command! -bar -bang -nargs=0 -complete=customlist,fugitive#CompleteObject Gdelete exe fugitive#DeleteCommand(, , +"", 0, "", , [])' endif -if exists(':Gmove') != 2 +if exists(':Gmove') != 2 && get(g:, 'fugitive_legacy_commands', 1) exe 'command! -bar -bang -nargs=1 -complete=customlist,fugitive#CompleteObject Gmove exe fugitive#MoveCommand( , , +"", 0, "", , [])' endif -if exists(':Grename') != 2 +if exists(':Grename') != 2 && get(g:, 'fugitive_legacy_commands', 1) exe 'command! -bar -bang -nargs=1 -complete=customlist,fugitive#RenameComplete Grename exe fugitive#RenameCommand(, , +"", 0, "", , [])' endif exe 'command! -bar -bang -range=-1 -nargs=* -complete=customlist,fugitive#CompleteObject GBrowse exe fugitive#BrowseCommand(, , +"", 0, "", , [])' -if exists(':Gbrowse') != 2 +if exists(':Gbrowse') != 2 && get(g:, 'fugitive_legacy_commands', 1) exe 'command! -bar -bang -range=-1 -nargs=* -complete=customlist,fugitive#CompleteObject Gbrowse exe fugitive#BrowseCommand(, , +"", 0, "", , [])' endif