aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-client/src
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@atuin.sh>2026-04-04 04:00:37 +0100
committerGitHub <noreply@github.com>2026-04-04 04:00:37 +0100
commitf68c3de3b7bd15a5f16ca09352277d297574787e (patch)
tree32cf481b6af1b1ff035a7b7fde89f93c2a8bab9d /crates/atuin-client/src
parentfeat: option to disable mouse support (#3372) (diff)
downloadatuin-f68c3de3b7bd15a5f16ca09352277d297574787e.zip
feat: add support for deleting all matching commands via keybindings (#3375)
Diffstat (limited to 'crates/atuin-client/src')
-rw-r--r--crates/atuin-client/src/history/store.rs14
1 files changed, 14 insertions, 0 deletions
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<Item = History>,
+ ) -> Result<Vec<RecordId>> {
+ 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