From 82a7c8d3219749dd298b23bae22456657ee92575 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Fri, 15 Mar 2024 08:50:43 +0000 Subject: fix(search): case insensitive hostname filtering (#1883) --- atuin-client/src/database.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'atuin-client/src') 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), -- cgit v1.3.1