diff options
author | Ellie Huxtable <ellie@elliehuxtable.com> | 2024-03-15 08:50:43 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-15 08:50:43 +0000 |
commit | 82a7c8d3219749dd298b23bae22456657ee92575 (patch) | |
tree | a5908552552be45dceaf0308e100e34a3f5dd390 /atuin-client/src | |
parent | b04fc471deb923937b8ef9aab2f39301f8457894 (diff) |
fix(search): case insensitive hostname filtering (#1883)
Diffstat (limited to 'atuin-client/src')
-rw-r--r-- | atuin-client/src/database.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/atuin-client/src/database.rs b/atuin-client/src/database.rs index 8d64bf36..b0bcae31 100644 --- a/atuin-client/src/database.rs +++ b/atuin-client/src/database.rs @@ -420,7 +420,9 @@ impl Database for Sqlite { match filter { FilterMode::Global => &mut sql, - FilterMode::Host => sql.and_where_eq("hostname", quote(&context.hostname)), + FilterMode::Host => { + sql.and_where_eq("lower(hostname)", quote(context.hostname.to_lowercase())) + } FilterMode::Session => sql.and_where_eq("session", quote(&context.session)), FilterMode::Directory => sql.and_where_eq("cwd", quote(&context.cwd)), FilterMode::Workspace => sql.and_where_like_left("cwd", git_root), |