diff options
| author | Lucas Trzesniewski <lucas.trzesniewski@gmail.com> | 2025-10-07 00:18:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-06 18:18:09 -0400 |
| commit | 8ca8165c1255c513bbd3711881015d7a119d5e0d (patch) | |
| tree | 210085cb5f76043ad8467e36185c9a016b422c9f | |
| parent | feat: more accurately filter secret tokens (#2932) (diff) | |
| download | atuin-8ca8165c1255c513bbd3711881015d7a119d5e0d.zip | |
feat: add shell pipelines to command chaining (#2938)
I wanted to use `command_chaining` to write a pipeline (`cmdA | cmdB`)
and was genuinely surprised it didn't work.
## Checks
- [x] I am happy for maintainers to push small adjustments to this PR,
to speed up the review cycle
- [x] I have checked that there are no existing pull requests for the
same thing
| -rw-r--r-- | crates/atuin-client/config.toml | 2 | ||||
| -rw-r--r-- | crates/atuin/src/command/client/search/interactive.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/atuin-client/config.toml b/crates/atuin-client/config.toml index 476a95db..c40461ab 100644 --- a/crates/atuin-client/config.toml +++ b/crates/atuin-client/config.toml @@ -158,7 +158,7 @@ # 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. +## 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 diff --git a/crates/atuin/src/command/client/search/interactive.rs b/crates/atuin/src/command/client/search/interactive.rs index 2f577292..f2471879 100644 --- a/crates/atuin/src/command/client/search/interactive.rs +++ b/crates/atuin/src/command/client/search/interactive.rs @@ -1121,7 +1121,7 @@ pub async fn history( // Check if this is a command chaining scenario let is_command_chaining = if settings.command_chaining { let trimmed = original_query.trim_end(); - trimmed.ends_with("&&") || trimmed.ends_with("||") + trimmed.ends_with("&&") || trimmed.ends_with('|') } else { false }; |
