From 84c267eadacaf89101c32fd6aec37a114e863834 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Tue, 22 Jul 2025 19:32:10 +0200 Subject: feat: command chaining (#2834) * feat: command chaining Allow for smart completion of commands ending in && or || * fmt --- crates/atuin-client/config.toml | 3 +++ crates/atuin-client/src/settings.rs | 2 ++ 2 files changed, 5 insertions(+) (limited to 'crates/atuin-client') diff --git a/crates/atuin-client/config.toml b/crates/atuin-client/config.toml index ac9f8a1a..a154a65b 100644 --- a/crates/atuin-client/config.toml +++ b/crates/atuin-client/config.toml @@ -149,6 +149,9 @@ # This applies for new installs. Old installs will keep the old behaviour unless configured otherwise. enter_accept = true +## Defaults to false. If enabled, when triggered after && or ||, Atuin will complete commands to chain rather than replace the current line. +# command_chaining = false + ## Defaults to "emacs". This specifies the keymap on the startup of `atuin ## search`. If this is set to "auto", the startup keymap mode in the Atuin ## search is automatically selected based on the shell's keymap where the diff --git a/crates/atuin-client/src/settings.rs b/crates/atuin-client/src/settings.rs index d1f37e39..88bf27d5 100644 --- a/crates/atuin-client/src/settings.rs +++ b/crates/atuin-client/src/settings.rs @@ -494,6 +494,7 @@ pub struct Settings { pub local_timeout: f64, pub enter_accept: bool, pub smart_sort: bool, + pub command_chaining: bool, #[serde(default)] pub stats: Stats, @@ -799,6 +800,7 @@ impl Settings { .set_default("keymap_mode_shell", "auto")? .set_default("keymap_cursor", HashMap::::new())? .set_default("smart_sort", false)? + .set_default("command_chaining", false)? .set_default("store_failed", true)? .set_default("daemon.sync_frequency", 300)? .set_default("daemon.enabled", false)? -- cgit v1.3.1