1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-09 14:10:04 +08:00
SpaceVim/.SpaceVim.d/plugin/bundle.lua

13 lines
450 B
Lua
Raw Normal View History

2023-07-01 20:30:44 +08:00
local b = require('spacevim.dev.bundle')
vim.api.nvim_create_user_command('SPBundleUpdate', function(opt)
local bundles = b.get_bundles()
2023-07-01 20:43:49 +08:00
if opt.fargs[1] == 'all' then for _, v in pairs(bundles) do b.download(v) end end
2023-07-01 20:30:44 +08:00
for _, v in pairs(bundles) do
if v.username .. '/' .. v.repo == opt.fargs[1] then
b.download(v)
2023-07-01 20:43:49 +08:00
return
2023-07-01 20:30:44 +08:00
end
end
2023-07-01 20:43:49 +08:00
print('can not find bundle:' .. opt.fargs[1])
2023-07-01 20:30:44 +08:00
end, { nargs = 1, complete = b.complete })