feat(completions): 添加多个命令的自动补全功能

添加了多个命令的自动补全脚本,包括imageview、time、about等常用命令
同时修复了pkg命令中文件名输出格式的问题
This commit is contained in:
2025-09-03 16:26:31 +08:00
parent 9b94ae16e2
commit 16006674e6
22 changed files with 127 additions and 3 deletions

View File

@@ -0,0 +1,7 @@
local shell = require("shell")
local completion = require("cc.shell.completion")
shell.setCompletionFunction("app", completion.build(
{completion.choice, choices = {"install", "update", "remove", "list"}, desc = "Command"},
{completion.anything, desc = "App name", optional = true}
))