From ed394afa82ef919937521e5ce72fc467cec203f9 Mon Sep 17 00:00:00 2001 From: Patrick Decat Date: Sun, 18 Dec 2022 19:26:09 +0100 Subject: Allow overriding filter and search modes from CLI (#635) * Allow overriding filter and search modes from CLI arguments * Use session filter mode for bash up key binding * We precisely do not want to add quotes here so that all arguments are properly passed * Add --shell-up-key-binding hidden command argument and filter_mode_shell_up_key_binding configuration option to allow customizing the filter mode used when atuin is invoked from a shell up-key binding * Correct up binding for zsh Co-authored-by: Ellie Huxtable --- src/command/client.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/command/client.rs') diff --git a/src/command/client.rs b/src/command/client.rs index df74ac52..551b2225 100644 --- a/src/command/client.rs +++ b/src/command/client.rs @@ -44,7 +44,7 @@ impl Cmd { .parse_env("ATUIN_LOG") .init(); - let settings = Settings::new().wrap_err("could not load client settings")?; + let mut settings = Settings::new().wrap_err("could not load client settings")?; let db_path = PathBuf::from(settings.db_path.as_str()); let mut db = Sqlite::new(db_path).await?; @@ -53,7 +53,7 @@ impl Cmd { Self::History(history) => history.run(&settings, &mut db).await, Self::Import(import) => import.run(&mut db).await, Self::Stats(stats) => stats.run(&mut db, &settings).await, - Self::Search(search) => search.run(&mut db, &settings).await, + Self::Search(search) => search.run(&mut db, &mut settings).await, #[cfg(feature = "sync")] Self::Sync(sync) => sync.run(settings, &mut db).await, } -- cgit v1.3.1