aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Rose <offline@offby1.net>2025-01-27 15:15:33 -0800
committerGitHub <noreply@github.com>2025-01-27 23:15:33 +0000
commit2ee88015bb9dfea591f12974dd18dbd50e62de95 (patch)
treef29f697b68148efa949c29824c6a8a8c8553fc6d
parentchore(deps): bump lukemathwalker/cargo-chef (#2544) (diff)
downloadatuin-2ee88015bb9dfea591f12974dd18dbd50e62de95.zip
feat: Add the --print0 option to search (#2562)
This mirrors the addition to `history` from #1274, but with search too. Ther are history search implementations for shells that are set to search instead of running the history command.
-rw-r--r--crates/atuin/src/command/client/search.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/atuin/src/command/client/search.rs b/crates/atuin/src/command/client/search.rs
index b0e503ad..b6504bd9 100644
--- a/crates/atuin/src/command/client/search.rs
+++ b/crates/atuin/src/command/client/search.rs
@@ -90,6 +90,10 @@ pub struct Cmd {
#[arg(long)]
cmd_only: bool,
+ /// Terminate the output with a null, for better multiline handling
+ #[arg(long)]
+ print0: bool,
+
/// Delete anything matching this query. Will not print out the match
#[arg(long)]
delete: bool,
@@ -255,7 +259,7 @@ impl Cmd {
&entries,
ListMode::from_flags(self.human, self.cmd_only),
format,
- false,
+ self.print0,
true,
tz,
);