From f69ea02bb12fd605cb1ffb9da0da1f289635d594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A7=9C=E6=B0=B8=E6=98=A5?= Date: Thu, 18 Dec 2025 10:55:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=99=A8=E5=88=86=E6=94=AF=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- autoload/tui/core/plug.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/autoload/tui/core/plug.vim b/autoload/tui/core/plug.vim index 381716d..8ca5660 100644 --- a/autoload/tui/core/plug.vim +++ b/autoload/tui/core/plug.vim @@ -89,6 +89,10 @@ def Parse(plug_id: string, plug_options: dict = {}): dict # path: string const plug_path = tui#util#path#Join(tui#core#cached#Get('tui.plug.home'), split(plug_id, '/')[-1]) plug_info['path'] = plug_path + # branch + if has_key(plug_options, 'branch') && !empty(plug_options['branch']) + plug_info['branch'] = plug_options['branch'] + endif # enabled: bool / func var plug_enabled = v:true if has_key(plug_options, 'enabled') @@ -174,6 +178,9 @@ export def Install() var plug_info = tui_plug_registed[plug_id] if !isdirectory(plug_info['path']) var cmds = 'git clone https://github.com/' .. plug_id .. ' ' .. plug_info['path'] + if has_key(plug_info, 'branch') && !empty(plug_info['branch']) + cmds = 'git clone -b ' .. plug_info['branch'] .. ' https://github.com/' .. plug_id .. ' ' .. plug_info['path'] + endif echo "executing " .. cmds system(cmds) echo "install success"