From 73056ede2bce8312557a78860cc87194accb8924 Mon Sep 17 00:00:00 2001 From: sholderbach Date: Tue, 26 Mar 2024 15:00:19 +0100 Subject: [PATCH] Make cwd prefix case sensitive as well Discuss: - Windows FS operations can be case-insensitive for the user - Can the actual operations through which we gather the `cwd` return different case? --- src/history/sqlite_backed.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/history/sqlite_backed.rs b/src/history/sqlite_backed.rs index 9f3e6fd8..b10a031f 100644 --- a/src/history/sqlite_backed.rs +++ b/src/history/sqlite_backed.rs @@ -349,8 +349,8 @@ impl SqliteBackedHistory { params.push((":cwd", Box::new(cwd_exact))); } if let Some(cwd_prefix) = &query.filter.cwd_prefix { - wheres.push("cwd like :cwd_like"); - let cwd_like = format!("{cwd_prefix}%"); + wheres.push("cwd glob :cwd_like"); + let cwd_like = format!("{cwd_prefix}*"); params.push((":cwd_like", Box::new(cwd_like))); } if let Some(exit_successful) = query.filter.exit_successful {