From c6cfdd0695a69ff05adaf3c8a8e7e5b992091e1a Mon Sep 17 00:00:00 2001 From: verse91 Date: Sun, 10 May 2026 00:12:40 +0700 Subject: [PATCH] chore(filegen): use strings.Contains for more flexible directory searching --- commands/core/filegen.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/commands/core/filegen.go b/commands/core/filegen.go index 89f1efb..e232eef 100644 --- a/commands/core/filegen.go +++ b/commands/core/filegen.go @@ -87,7 +87,16 @@ func FileGenerator(filters ...string) GeneratorFunc { continue } - if filePrefix != "" && !HasPrefix(name, filePrefix) { + match := false + if filePrefix == "" { + match = true + } else if dirOnly { + match = strings.Contains(strings.ToLower(name), strings.ToLower(filePrefix)) + } else { + match = HasPrefix(name, filePrefix) + } + + if !match { continue }