From 69752d2a9037fcfb19cd0f5e5b6ccab035d95c6c Mon Sep 17 00:00:00 2001 From: Lykin <137850705+tiny-craft@users.noreply.github.com> Date: Thu, 8 May 2025 18:32:10 +0800 Subject: [PATCH] pref: add `*` to filter keyword prefix when use fuzzy matching (#437) --- frontend/src/stores/browser.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/stores/browser.js b/frontend/src/stores/browser.js index 477e7d1..acdc49e 100644 --- a/frontend/src/stores/browser.js +++ b/frontend/src/stores/browser.js @@ -1,5 +1,5 @@ import { defineStore } from 'pinia' -import { endsWith, get, isEmpty, join, map, now, size, slice, split } from 'lodash' +import { endsWith, get, isEmpty, join, map, now, size, slice, split, startsWith } from 'lodash' import { AddHashField, AddListItem, @@ -644,6 +644,9 @@ const useBrowserStore = defineStore('browser', { } if (!isRedisGlob(match) && !exact) { + if (!startsWith(match, '*')) { + match = '*' + match + } if (!endsWith(match, '*')) { match = match + '*' }