mirror of
https://github.com/CCLeonOS/LeonOS.git
synced 2026-03-03 15:17:01 +00:00
feat(配置程序): 添加查找设置功能并修复通配符匹配
为config程序添加find命令,支持按名称或描述搜索设置,并支持大小写不敏感选项 修复find.lua中的通配符匹配问题 优化history.lua中的线程环境访问逻辑 添加测试配置文件test_config_find.lua 更新安装程序版本号
This commit is contained in:
@@ -56,8 +56,8 @@ local function matches_pattern(str, pattern, case_insensitive)
|
||||
|
||||
-- 转换通配符模式为Lua正则表达式
|
||||
pattern = pattern:gsub("%.", "%%.")
|
||||
:gsub("%*\%\*", "%.%")
|
||||
:gsub("%*", "[^"]*")
|
||||
:gsub("%*%%%*", ".*")
|
||||
:gsub("%*", "[^/]*")
|
||||
:gsub("%?", ".")
|
||||
|
||||
return str:match("^" .. pattern .. "$") ~= nil
|
||||
|
||||
Reference in New Issue
Block a user