CLIPBOARD

Bracketed Paste Mode

Chau7 supports bracketed paste mode, wrapping pasted text in escape sequences so applications can distinguish pastes from typed input.

The problem

  • Multi-line pastes into shells are risky when the receiving app cannot distinguish pasted text from typing.
  • Paste safety depends on protocol support, and most users do not know when they have it.

What Chau7 does about it

  • Sends bracketed paste sequences when the running application requests them.
  • Falls back to raw paste when the app does not support the protocol.
  • Preserves direct paste semantics instead of inserting a fake preview layer.
  • Makes supporting shells and editors treat pasted newlines more safely.

What is Bracketed Paste Mode in Chau7?

Bracketed Paste Mode is a terminal protocol where Chau7 wraps pasted text in special escape sequences. When the running application has enabled bracketed paste mode, Chau7 sends the standard escape sequences (ESC[200~ before and ESC[201~ after the pasted content) so the application can distinguish pasted text from typed text.

This lets applications like zsh, vim, and other programs handle pasted content appropriately, for example by not executing newlines immediately.

How does pasting work in Chau7?

In Chau7, pasting sends clipboard content directly to the active terminal. There is no intermediate confirmation dialog or preview step. The paste is sent immediately to the running application.

When the running application has enabled bracketed paste mode, Chau7 wraps the pasted content in the standard escape sequences. When bracketed paste mode is not enabled, the content is sent as-is, just like typed input.

Does Chau7 have a paste confirmation dialog?

No. Chau7 currently sends pastes directly to the terminal without a confirmation dialog. Paste content goes straight to the running application.

Bracketed paste mode provides some protection by letting applications distinguish pasted text from typed text, but there is no visual confirmation step before the paste is sent by Chau7.

What is bracketed paste mode?

Bracketed paste mode is a terminal protocol where the terminal emulator wraps pasted text in escape sequences. Applications that support this protocol can detect pasted text and handle it differently from typed input.

Modern shells like zsh enable bracketed paste mode by default, which prevents pasted newlines from executing commands immediately. However, many programs do not support bracketed paste mode, in which case pasted text is treated the same as typed input.

Does bracketed paste mode prevent accidental command execution?

Bracketed paste mode helps, but protection depends entirely on the running application handling the escape sequences correctly. Many programs ignore bracketed paste sequences, in which case pasted text with newlines can execute commands immediately.

For applications that do support bracketed paste mode, the protection is effective. Zsh, for example, will not execute pasted content until you press Enter, giving you a chance to review what was pasted.

Questions this answers

  • What is Bracketed Paste Mode in Chau7 terminal?
  • How does pasting work in Chau7?
  • Does Chau7 have a paste confirmation dialog?
  • What is bracketed paste mode?
  • Does bracketed paste mode prevent accidental command execution?

Frequently asked questions

What is Bracketed Paste Mode in Chau7 terminal?

Bracketed Paste Mode is a terminal protocol where Chau7 wraps pasted text in escape sequences so the running application can distinguish pasted text from typed text. When an application enables bracketed paste mode, Chau7 sends the appropriate sequences.

How does pasting work in Chau7?

In Chau7, pasting sends clipboard content directly to the active terminal. When the running application has enabled bracketed paste mode, Chau7 wraps the content in the standard escape sequences. There is no intermediate confirmation dialog or preview.

Does Chau7 have a paste confirmation dialog?

No. Chau7 currently sends pastes directly to the terminal without a confirmation dialog. Bracketed paste mode provides some protection by letting applications distinguish pasted text from typed text, but there is no visual confirmation step before the paste is sent.

What is bracketed paste mode?

Bracketed paste mode is a terminal protocol where the terminal emulator wraps pasted text in escape sequences (ESC[200~ before and ESC[201~ after). Applications that support this protocol can detect pasted text and handle it differently from typed input, for example by not executing newlines immediately.

Does bracketed paste mode prevent accidental command execution?

Bracketed paste mode helps applications distinguish pasted text from typed text, but protection depends on the running application handling the sequences correctly. Many programs do not support bracketed paste mode, in which case pasted text is treated the same as typed input.