feat(cache): auto-completion to the cli1
This commit is contained in:
parent
0a39a2e6a2
commit
cb4d39b4a7
1 changed files with 11 additions and 1 deletions
|
|
@ -40,8 +40,18 @@ end, {
|
|||
return vim.tbl_filter(function(cmd)
|
||||
return cmd:find(ArgLead, 1, true) == 1
|
||||
end, candidates)
|
||||
elseif num_args == 3 then
|
||||
if args[2] == 'cache' then
|
||||
return vim.tbl_filter(function(cmd)
|
||||
return cmd:find(ArgLead, 1, true) == 1
|
||||
end, { 'clear' })
|
||||
end
|
||||
elseif num_args == 4 then
|
||||
if vim.tbl_contains(platforms, args[2]) then
|
||||
if args[2] == 'cache' and args[3] == 'clear' then
|
||||
return vim.tbl_filter(function(cmd)
|
||||
return cmd:find(ArgLead, 1, true) == 1
|
||||
end, platforms)
|
||||
elseif vim.tbl_contains(platforms, args[2]) then
|
||||
local cache = require('cp.cache')
|
||||
cache.load()
|
||||
local contest_data = cache.get_contest_data(args[2], args[3])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue