aboutsummaryrefslogtreecommitdiffstats
path: root/crates
diff options
context:
space:
mode:
authorLucas Trzesniewski <lucas.trzesniewski@gmail.com>2025-08-05 19:30:31 +0200
committerEllie Huxtable <ellie@elliehuxtable.com>2025-09-18 12:02:08 -0700
commit8e8291397951f6d14e05e2d8ba5c758c292d8447 (patch)
tree3dae9e4cf8ea3d62d4ed51e6270a4a5cc4eb544f /crates
parentfix: clippy warnings (diff)
downloadatuin-8e8291397951f6d14e05e2d8ba5c758c292d8447.zip
fix: dissociate command_chaining from enter_accept
Diffstat (limited to 'crates')
-rw-r--r--crates/atuin/src/command/client/search/interactive.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/crates/atuin/src/command/client/search/interactive.rs b/crates/atuin/src/command/client/search/interactive.rs
index 973a043d..1639c10c 100644
--- a/crates/atuin/src/command/client/search/interactive.rs
+++ b/crates/atuin/src/command/client/search/interactive.rs
@@ -1269,14 +1269,13 @@ pub async fn history(
match result {
InputAction::Accept(index) if index < results.len() => {
let mut command = results.swap_remove(index).command;
- if accept
+
+ if is_command_chaining && (utils::is_zsh() || utils::is_fish() || utils::is_bash()) {
+ command = String::from("__atuin_chain_command__:") + &command;
+ } else if accept
&& (utils::is_zsh() || utils::is_fish() || utils::is_bash() || utils::is_xonsh())
{
- if is_command_chaining {
- command = String::from("__atuin_chain_command__:") + &command;
- } else {
- command = String::from("__atuin_accept__:") + &command;
- }
+ command = String::from("__atuin_accept__:") + &command;
}
// index is in bounds so we return that entry