Merge pull request #144 from xushiwei/q

nmindex: query auto add _ prefix
This commit is contained in:
xushiwei
2024-05-11 05:45:26 +08:00
committed by GitHub

View File

@@ -73,6 +73,11 @@ func makeIndex() {
}
func query(q string) {
if len(q) > 0 {
if c := q[0]; c != '*' && c != '_' {
q = "_" + q
}
}
files, err := nm.Query(indexDir(), q)
check(err)
for _, f := range files {