diff --git a/atuin-client/src/settings.rs b/atuin-client/src/settings.rs index 95b01c8..6b642b7 100644 --- a/atuin-client/src/settings.rs +++ b/atuin-client/src/settings.rs @@ -110,7 +110,7 @@ pub struct Settings { pub session_path: String, pub search_mode: SearchMode, pub filter_mode: FilterMode, - pub filter_mode_shell_up_key_binding: FilterMode, + pub filter_mode_shell_up_key_binding: Option, pub shell_up_key_binding: bool, pub show_preview: bool, pub exit_mode: ExitMode, @@ -295,7 +295,6 @@ impl Settings { .set_default("sync_address", "https://api.atuin.sh")? .set_default("search_mode", "fuzzy")? .set_default("filter_mode", "global")? - .set_default("filter_mode_shell_up_key_binding", "global")? .set_default("shell_up_key_binding", false)? .set_default("show_preview", false)? .set_default("exit_mode", "return-original")? diff --git a/src/command/client/search.rs b/src/command/client/search.rs index 9321f11..f437783 100644 --- a/src/command/client/search.rs +++ b/src/command/client/search.rs @@ -88,7 +88,9 @@ impl Cmd { if self.filter_mode.is_some() { settings.filter_mode = self.filter_mode.unwrap(); } + settings.shell_up_key_binding = self.shell_up_key_binding; + if self.interactive { let item = interactive::history(&self.query, settings, db).await?; eprintln!("{item}"); diff --git a/src/command/client/search/interactive.rs b/src/command/client/search/interactive.rs index 9e7d340..01175b5 100644 --- a/src/command/client/search/interactive.rs +++ b/src/command/client/search/interactive.rs @@ -427,7 +427,9 @@ pub async fn history( results_state: ListState::default(), context: current_context(), filter_mode: if settings.shell_up_key_binding { - settings.filter_mode_shell_up_key_binding + settings + .filter_mode_shell_up_key_binding + .unwrap_or(settings.filter_mode) } else { settings.filter_mode },