From b5b1c4ea562975542ebf2614446d3dbdd8acfd03 Mon Sep 17 00:00:00 2001 From: Hau Nguyen Date: Sun, 11 Feb 2024 00:06:43 +0700 Subject: [PATCH] feat: add atuin sqlite tricks --- docs/2023-07-01-pastebin.html | 18 ++++++++++++++++++ posts/2023-07-01-pastebin.md | 12 ++++++++++++ 2 files changed, 30 insertions(+) diff --git a/docs/2023-07-01-pastebin.html b/docs/2023-07-01-pastebin.html index afee29c..deefe35 100644 --- a/docs/2023-07-01-pastebin.html +++ b/docs/2023-07-01-pastebin.html @@ -387,6 +387,24 @@ rsync -avzP src/ dst in src, useful to sync dst with src +

+ atuin +

+

Remove duplicated command:

+
+
delete
+from history
+where id not in (select max(id)
+                 from history
+                 group by command);
+