feat(配置程序): 添加查找设置功能并修复通配符匹配

为config程序添加find命令,支持按名称或描述搜索设置,并支持大小写不敏感选项
修复find.lua中的通配符匹配问题
优化history.lua中的线程环境访问逻辑
添加测试配置文件test_config_find.lua
更新安装程序版本号
This commit is contained in:
2025-09-03 12:50:06 +08:00
parent 7e07e1636f
commit 487e8f14c2
5 changed files with 156 additions and 12 deletions

View File

@@ -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