aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTom Cammann <tom.cammann@oracle.com>2023-03-29 09:27:14 +0100
committerGitHub <noreply@github.com>2023-03-29 09:27:14 +0100
commitfa0a1447a60a854f2997c9e1b9fd87bca871b1d9 (patch)
tree64b22e99581aa72af86d0423897715f80ffd61f6 /src
parentinstall.sh - add endeavouros to archlinux detection (#827) (diff)
downloadatuin-fa0a1447a60a854f2997c9e1b9fd87bca871b1d9.zip
Add `--offset` flag to `atuin search` (#825)
This flag allows the user to continue searching at an offset. This is useful for building tools that use atuin to search for previous commands and return only one result. ``` atuin search --limit 1 atuin search --limit 1 --offset 1 atuin search --limit 1 --offset 2 ```
Diffstat (limited to '')
-rw-r--r--src/command/client/search.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/command/client/search.rs b/src/command/client/search.rs
index 7a4d365f..9d05fe58 100644
--- a/src/command/client/search.rs
+++ b/src/command/client/search.rs
@@ -49,6 +49,10 @@ pub struct Cmd {
#[arg(long)]
limit: Option<i64>,
+ /// Offset from the start of the results
+ #[arg(long)]
+ offset: Option<i64>,
+
/// Open interactive search UI
#[arg(long, short)]
interactive: bool,
@@ -111,6 +115,7 @@ impl Cmd {
before: self.before,
after: self.after,
limit: self.limit,
+ offset: self.offset,
};
let mut entries =