Fix session history (#620)

This commit is contained in:
Patrick Jackson 2022-12-16 10:15:27 -07:00 committed by GitHub
parent 25a2732817
commit 5b22f29329
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -206,12 +206,12 @@ impl Cmd {
db.query_history(&query).await?
}
(Some(session), None) => {
let query = format!("select * from history where session = {};", session);
let query = format!("select * from history where session = '{}';", session);
db.query_history(&query).await?
}
(Some(session), Some(cwd)) => {
let query = format!(
"select * from history where cwd = '{}' and session = {};",
"select * from history where cwd = '{}' and session = '{}';",
cwd, session
);
db.query_history(&query).await?