From 4a50ce366639ca9dac7324d6a47d6a0e6c7fccdf Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Wed, 21 Apr 2021 18:13:51 +0100 Subject: Bugfixes, show time ago, perf improvements Also allow unique listing and more ergonomic cwd usage --- src/command/mod.rs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'src/command/mod.rs') diff --git a/src/command/mod.rs b/src/command/mod.rs index 6fd52613..805ad9f0 100644 --- a/src/command/mod.rs +++ b/src/command/mod.rs @@ -43,7 +43,18 @@ pub enum AtuinCmd { Uuid, #[structopt(about = "interactive history search")] - Search { query: Vec }, + Search { + #[structopt(long, short, about = "filter search result by directory")] + cwd: Option, + + #[structopt(long, short, about = "filter search result by exit code")] + exit: Option, + + #[structopt(long, short, about = "open interactive search UI")] + interactive: bool, + + query: Vec, + }, #[structopt(about = "sync with the configured server")] Sync { @@ -76,7 +87,12 @@ impl AtuinCmd { Self::Server(server) => server.run(&server_settings).await, Self::Stats(stats) => stats.run(&mut db, &client_settings), Self::Init => init::init(), - Self::Search { query } => search::run(&query, &mut db), + Self::Search { + cwd, + exit, + interactive, + query, + } => search::run(cwd, exit, interactive, &query, &mut db), Self::Sync { force } => sync::run(&client_settings, force, &mut db).await, Self::Login(l) => l.run(&client_settings), -- cgit v1.3.1