rust-cli / rust-cli/rexpect

Disabling bracketed paste mode

Open
#143 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
391
Forks
69
Avg merge
1d 34m
Merged PRs (30d)
2

Description

When integrating rexpect into some of our tests I ran into an issue where the escape codes for bracketed paste mode were present in the output. This naturally broke the tests until I figured out the issue. I found that adding bind 'set enable-bracketed-paste off' to the prompt-setting command here solves the problem:

https://github.com/rust-cli/rexpect/blob/be7f1ab8147c3c17e0600e59d1f98d1963d2d880/src/session.rs#L414

(I'm not sure it's relevant, but in my fork that whole command is actually PS1="~~~~" && unset PROMPT_COMMAND && bind 'set enable-bracketed-paste off').

Is this something you'd like to see upstreamed, or are there legitimate cases where disabling this is undesired?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/session.rs around line 414 and inspect the prompt-setting command that emits the bracketed-paste escape codes. Reproduce the affected rexpect tests or integration scenario, then verify that the resulting output no longer contains those codes while preserving the prompt setup behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, rust
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.