aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/mod.rs
diff options
context:
space:
mode:
authorEllie Huxtable <e@elm.sh>2021-03-20 00:50:31 +0000
committerGitHub <noreply@github.com>2021-03-20 00:50:31 +0000
commit716c7722cda29bf612508bb96f51822a86e0f69e (patch)
treefa3c4c192fc05b078397fcd510d39ae78e46abfa /src/command/mod.rs
parentAdd config file support (#15) (diff)
downloadatuin-716c7722cda29bf612508bb96f51822a86e0f69e.zip
Add TUI, resolve #19, #17, #16 (#21)
Diffstat (limited to 'src/command/mod.rs')
-rw-r--r--src/command/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/command/mod.rs b/src/command/mod.rs
index c74b138f..3ebb92e0 100644
--- a/src/command/mod.rs
+++ b/src/command/mod.rs
@@ -5,9 +5,11 @@ use uuid::Uuid;
use crate::local::database::Database;
use crate::settings::Settings;
+mod event;
mod history;
mod import;
mod init;
+mod search;
mod server;
mod stats;
@@ -33,6 +35,9 @@ pub enum AtuinCmd {
#[structopt(about = "generates a UUID")]
Uuid,
+
+ #[structopt(about = "interactive history search")]
+ Search { query: Vec<String> },
}
pub fn uuid_v4() -> String {
@@ -47,6 +52,7 @@ impl AtuinCmd {
Self::Server(server) => server.run(),
Self::Stats(stats) => stats.run(db, settings),
Self::Init => init::init(),
+ Self::Search { query } => search::run(&query, db),
Self::Uuid => {
println!("{}", uuid_v4());