aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-client/src
diff options
context:
space:
mode:
authorlilydjwg <lilydjwg@gmail.com>2026-01-25 13:46:39 +0800
committerlilydjwg <lilydjwg@gmail.com>2026-01-25 13:46:39 +0800
commit904422efb087b3cdec4a49c8e2f7b600e87ad967 (patch)
tree9f34105311020cf49311b7733142d4d43671944d /crates/atuin-client/src
parentfeat(ui): highlight fulltext search as fulltext search instead of fuzzy search (diff)
downloadatuin-904422efb087b3cdec4a49c8e2f7b600e87ad967.zip
fix for 'term
Diffstat (limited to 'crates/atuin-client/src')
-rw-r--r--crates/atuin-client/src/database.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/atuin-client/src/database.rs b/crates/atuin-client/src/database.rs
index b194e655..d51c2637 100644
--- a/crates/atuin-client/src/database.rs
+++ b/crates/atuin-client/src/database.rs
@@ -509,6 +509,9 @@ impl Database for Sqlite {
QueryToken::MatchEnd(term) => {
format!("{glob}{term}")
}
+ QueryToken::MatchFull(term) => {
+ format!("{glob}{term}{glob}")
+ }
QueryToken::Negation(term) => {
is_inverse = true;
format!("{glob}{term}{glob}")
@@ -1189,6 +1192,7 @@ pub enum QueryToken<'a> {
Negation(&'a str),
MatchStart(&'a str),
MatchEnd(&'a str),
+ MatchFull(&'a str),
Or,
Regex(&'a str),
}
@@ -1243,6 +1247,8 @@ impl<'a> Iterator for QueryTokenizer<'a> {
QueryToken::MatchEnd(s)
} else if let Some(s) = part.strip_prefix('!') {
QueryToken::Negation(s)
+ } else if let Some(s) = part.strip_prefix('\'') {
+ QueryToken::MatchFull(s)
} else if part == "|" {
QueryToken::Or
} else {