Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

ccntrq
Copy link
Contributor

@ccntrq ccntrq commented Jun 18, 2025

The output from spawn_bash was inconsistent depending on the terminal environment where the process was spawned. In tmux and other advanced terminals, the output included ANSI control sequences for features like bracketed paste mode, causing test failures and unreliable behavior.

Set TERM="" when spawning bash to force a dumb terminal mode, ensuring clean, consistent output regardless of the parent terminal environment.

Example error:

thread 'session::tests::test_bash' panicked at src/session.rs:542:9:
assertion `left == right` failed
  left: "/tmp\r\n"
  right: "\u{1b}[?2004l\r\r\n/tmp\r\n\u{1b}[?2004h"

The output from `spawn_bash` was inconsistent depending on the terminal
environment where the process was spawned. In tmux and other advanced
terminals, the output included ANSI control sequences for features like
bracketed paste mode, causing test failures and unreliable behavior.

Set TERM="" when spawning bash to force a dumb terminal mode, ensuring
clean, consistent output regardless of the parent terminal environment.

Example error:

```
thread 'session::tests::test_bash' panicked at src/session.rs:542:9:
assertion `left == right` failed
  left: "/tmp\r\n"
  right: "\u{1b}[?2004l\r\r\n/tmp\r\n\u{1b}[?2004h"
 ```
@epage epage merged commit 893b1a5 into rust-cli:main Jun 18, 2025
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants