summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorewy <ewy0@protonmail.com>2026-07-11 19:01:48 +0200
committerewy <ewy0@protonmail.com>2026-07-11 19:01:48 +0200
commit45895d70edb51c877714d6abae70be73f0df6998 (patch)
treef396c2622c70790b6e35d593c8bcb237b5f8eb44
parent17d86c1724aa1e4636e1c6ae6e8960111e61c4c1 (diff)
fix auto-all behaviour with identical target names
-rw-r--r--search/search.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/search/search.go b/search/search.go
index d0d66eb..3ed8ea1 100644
--- a/search/search.go
+++ b/search/search.go
@@ -65,6 +65,9 @@ args_loop:
// uncertain about source, check ours to see if any match
for _, t := range src.Targets {
if t.Matches(arg) {
+ if len(t.Sub()) <= i {
+ continue
+ }
if slices.Equal(t.Sub(), subdir) {
target = t
targetSource = src