From f68c3de3b7bd15a5f16ca09352277d297574787e Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Sat, 4 Apr 2026 04:00:37 +0100 Subject: feat: add support for deleting all matching commands via keybindings (#3375) --- crates/atuin-client/src/history/store.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'crates/atuin-client/src') diff --git a/crates/atuin-client/src/history/store.rs b/crates/atuin-client/src/history/store.rs index d166564f..ce7b43a1 100644 --- a/crates/atuin-client/src/history/store.rs +++ b/crates/atuin-client/src/history/store.rs @@ -180,6 +180,20 @@ impl HistoryStore { self.push_record(record).await } + /// Delete a batch of history entries via the record store. + /// Returns the record IDs so the caller can run incremental_build when ready. + pub async fn delete_entries( + &self, + entries: impl IntoIterator, + ) -> Result> { + let mut record_ids = Vec::new(); + for entry in entries { + let (id, _) = self.delete(entry.id).await?; + record_ids.push(id); + } + Ok(record_ids) + } + pub async fn push(&self, history: History) -> Result<(RecordId, RecordIdx)> { // TODO(ellie): move the history store to its own file // it's tiny rn so fine as is -- cgit v1.3.1