diff options
Diffstat (limited to 'atuin-client/src/database.rs')
-rw-r--r-- | atuin-client/src/database.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/atuin-client/src/database.rs b/atuin-client/src/database.rs index 057b399c..e56a8df0 100644 --- a/atuin-client/src/database.rs +++ b/atuin-client/src/database.rs @@ -274,8 +274,12 @@ impl Database for Sqlite { let res = sqlx::query( format!( - "select * from history + "select * from history h where command like ?1 || '%' + and timestamp = ( + select max(timestamp) from history + where h.command = history.command + ) order by timestamp desc {}", limit.clone() ) |