Skip to content

Commit 4ef8d9f

Browse files
committed
search via includes rather than startswith
1 parent ab0ada3 commit 4ef8d9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libexec/search.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ for await (const pkg of pantry.ls()) {
1616
let output = false
1717
const bins: string[] = []
1818
for (const bin of await pantry.getProvides(pkg)) {
19-
if (bin.startsWith(query)) {
19+
if (bin.includes(query)) {
2020
output = true
2121
bins.push(bin)
2222
}
2323
}
2424
if (output) {
2525
print(`${pkg.project}: ${bins.join(', ')}`)
26-
} else if (pkg.project.startsWith(query)) {
26+
} else if (pkg.project.includes(query)) {
2727
print(pkg.project.trim())
2828
output = true
2929
}

0 commit comments

Comments
 (0)