Force hyphen in :Gblame -opts
I want to change the interface to allow passing an optional filename.
This commit is contained in:
parent
668a615559
commit
362ce47ed1
@ -4057,10 +4057,11 @@ function! s:BlameCommand(line1, line2, range, count, bang, mods, reg, arg, args)
|
||||
if empty(s:Relative('/'))
|
||||
call s:throw('file or blob required')
|
||||
endif
|
||||
if filter(copy(a:args),'v:val !~# "^\\%(--abbrev=\\d*\\|--relative-date\\|--first-parent\\|--root\\|--show-name\\|-\\=\\%([ltfnsew]\\|[MC]\\d*\\)\\+\\)$"') != []
|
||||
if filter(copy(a:args),'v:val !~# "^-"') != []
|
||||
call s:throw("'-' required for all options")
|
||||
elseif filter(copy(a:args),'v:val !~# "^\\%(--abbrev=\\d*\\|--relative-date\\|--first-parent\\|--root\\|--show-name\\|-\\%([ltfnsew]\\|[MC]\\d*\\)\\+\\)$"') != []
|
||||
call s:throw('unsupported option')
|
||||
endif
|
||||
call map(a:args,'s:sub(v:val,"^\\ze[^-]","-")')
|
||||
let cmd = ['--no-pager', 'blame', '--show-number']
|
||||
if a:count
|
||||
let cmd += ['-L', a:line1 . ',' . a:line1]
|
||||
|
Loading…
Reference in New Issue
Block a user