aboutsummaryrefslogtreecommitdiffstats
path: root/atuin-client/src
diff options
context:
space:
mode:
authorEllie Huxtable <e@elm.sh>2021-04-26 14:25:57 +0100
committerGitHub <noreply@github.com>2021-04-26 13:25:57 +0000
commit0610ae197f41c0439665c97d914809bd0b10c2fa (patch)
tree9b2f2f31cb4befbdad26f7801c3fc1ea8c3b6a7f /atuin-client/src
parentFix pipeline (diff)
downloadatuin-0610ae197f41c0439665c97d914809bd0b10c2fa.zip
Pre release polishing (#42)
* Improve readme * Add demo gif * Update readme * Add mac build * Amend release config * Update gif
Diffstat (limited to 'atuin-client/src')
-rw-r--r--atuin-client/src/database.rs6
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()
)