mirror of
https://github.com/junegunn/vim-plug.git
synced 2026-01-02 13:53:22 +08:00
Interpret the second argument to Plug command as tag option
The older documentation of vim-plug suggested that the second string parameter to Plug command was for both branches and tags. But we've realized that tags and branches are not interchangeable (#174), and it is now recommended that the user explicitly specify whether it's a branch or a tag. The now-undocumented second parameter is currently for branches, but I'd like to change it for tags, as the use of tags are much more common.
This commit is contained in:
5
plug.vim
5
plug.vim
@@ -439,12 +439,9 @@ function! s:parse_options(arg)
|
||||
let opts = copy(s:base_spec)
|
||||
let type = type(a:arg)
|
||||
if type == s:TYPE.string
|
||||
let opts.branch = a:arg
|
||||
let opts.tag = a:arg
|
||||
elseif type == s:TYPE.dict
|
||||
call extend(opts, a:arg)
|
||||
if has_key(opts, 'tag')
|
||||
let opts.tag = remove(opts, 'tag')
|
||||
endif
|
||||
if has_key(opts, 'dir')
|
||||
let opts.dir = s:dirpath(expand(opts.dir))
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user