From 41f072a8b443b5a404916598f0c9b7a52f5c05fb Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Mon, 15 Feb 2021 23:33:30 +0000 Subject: Add init command (#12) * Add init command This makes setting up the shell part of A'tuin much easier. Eval the output of "atuin init". * Update readme, add up binding --- src/command/history.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/command/history.rs') diff --git a/src/command/history.rs b/src/command/history.rs index 09dd4364..bd440163 100644 --- a/src/command/history.rs +++ b/src/command/history.rs @@ -30,7 +30,7 @@ pub enum Cmd { )] List { #[structopt(long, short)] - dir: bool, + cwd: bool, #[structopt(long, short)] session: bool, @@ -77,13 +77,13 @@ impl Cmd { Ok(()) } - Self::List { session, dir, .. } => { + Self::List { session, cwd, .. } => { const QUERY_SESSION: &str = "select * from history where session = ?;"; const QUERY_DIR: &str = "select * from history where cwd = ?;"; const QUERY_SESSION_DIR: &str = "select * from history where cwd = ?1 and session = ?2;"; - let params = (session, dir); + let params = (session, cwd); let cwd = env::current_dir()?.display().to_string(); let session = env::var("ATUIN_SESSION")?; -- cgit v1.2.3