aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/mod.rs
diff options
context:
space:
mode:
authorEllie Huxtable <e@elm.sh>2021-04-21 18:13:51 +0100
committerEllie Huxtable <e@elm.sh>2021-04-21 21:26:44 +0100
commit4a50ce366639ca9dac7324d6a47d6a0e6c7fccdf (patch)
tree7ffd8848f675e1377f750cc0757768d074a5ac05 /src/command/mod.rs
parentBump rusqlite from 0.25.0 to 0.25.1 (#35) (diff)
downloadatuin-4a50ce366639ca9dac7324d6a47d6a0e6c7fccdf.zip
Bugfixes, show time ago, perf improvements
Also allow unique listing and more ergonomic cwd usage
Diffstat (limited to '')
-rw-r--r--src/command/mod.rs20
1 files changed, 18 insertions, 2 deletions
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<String> },
+ Search {
+ #[structopt(long, short, about = "filter search result by directory")]
+ cwd: Option<String>,
+
+ #[structopt(long, short, about = "filter search result by exit code")]
+ exit: Option<i64>,
+
+ #[structopt(long, short, about = "open interactive search UI")]
+ interactive: bool,
+
+ query: Vec<String>,
+ },
#[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),