From 2ee88015bb9dfea591f12974dd18dbd50e62de95 Mon Sep 17 00:00:00 2001 From: Chris Rose Date: Mon, 27 Jan 2025 15:15:33 -0800 Subject: 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. --- crates/atuin/src/command/client/search.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'crates') 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, ); -- cgit v1.3.1