diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 26f1637..516610f 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2861,7 +2861,7 @@ function! fugitive#Command(line1, line2, range, bang, mods, arg) abort let name = substitute(get(args, 0, ''), '\%(^\|-\)\(\l\)', '\u\1', 'g') let git = s:UserCommandList() let options = {'git': git, 'dir': dir, 'flags': flags} - if pager is# -1 && exists('*s:' . name . 'Subcommand') && get(args, 1, '') !=# '--help' + if pager is# -1 && name =~# '^\a\+$' && exists('*s:' . name . 'Subcommand') && get(args, 1, '') !=# '--help' try let overrides = s:{name}Subcommand(a:line1, a:line2, a:range, a:bang, a:mods, extend({'subcommand': args[0], 'subcommand_args': args[1:-1]}, options)) if type(overrides) == type('')