diff --git a/src/history/sqlite_backed.rs b/src/history/sqlite_backed.rs index 36d8fc7c..50e678b5 100644 --- a/src/history/sqlite_backed.rs +++ b/src/history/sqlite_backed.rs @@ -349,9 +349,8 @@ impl SqliteBackedHistory { params.push((":cwd", Box::new(cwd_exact))); } if let Some(cwd_prefix) = &query.filter.cwd_prefix { - wheres.push("cwd glob :cwd_like"); - let cwd_like = format!("{cwd_prefix}*"); - params.push((":cwd_like", Box::new(cwd_like))); + wheres.push("instr(cwd, :cwd_like) == 1"); + params.push((":cwd_like", Box::new(cwd_prefix))); } if let Some(exit_successful) = query.filter.exit_successful { if exit_successful {