client: confirm an unbracketed paste that carries control bytes, not only line breaks #217
Labels
No labels
Area/ci
Area/cli
Area/client
Area/client-core
Area/daemon
Area/deps
Area/docs
Area/grid
Area/manual
Area/nix
Area/protocol
Area/pty
Area/render
Area/shaping
Area/skills
Area/transport
Area/vt
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Performance
Kind/Security
Kind/Testing
perf-regression-accepted
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Blocked
Status
Need More Info
Status
Upstream
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
felis-terminal/felis#217
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
With bracketed paste off, a paste reaches the program byte for byte (
frame_pasteincrates/felis-daemon/src/serve/streaming.rsreturns the bytes unchanged when?2004is off), and the REQ-804 gate (paste_needs_confirmationincrates/felis-client-core/src/confirm.rs) fires only on\nor\r. A control byte other than a line break therefore lands as a typed key with no bar:^Oruns the line in bash/readline (operate-and-get-next) and zsh (accept-line-and-down-history), sorm -rf ~/x^Oexecutes without a newline.^Ccancels the line or the foreground job,^Don an empty prompt exits the shell,^Ukills the line,^X^Eopens$EDITOR.ESCsequences arrive as keys (history recall, Alt bindings).Bracketed paste off is a normal state: bash with
enable-bracketed-paste off, a shell after a TUI crashed orreset,cat/read, or a program that sent?2004l(logged per REQ-902, not blocked). Reasoned from the source; not yet reproduced in a window.Repro:
printf '\e[?2004l'in a shell, then paste text containing^OorESCwith no line break.Peers
paste_actions(defaultconfirm) asks before pasting text with any C0 control other than newline, space or tab.src/input/paste.zig,clipboard-paste-protection).selection.c).Proposed fix (0.3.x)
Widen the REQ-804 gate on the client: with
?2004off, a paste containing any C0 control other than HT raises the bar, not only one containing\n/\r. The bar text generalizes beyond "Paste N lines?". Confirmed bytes still ship verbatim.frame_pastestays as is, sofelis sessions send TEXT, the bridge, andPipeTarget::Pastekeep the behaviordocs/reference/cli.mddocuments (controls stripped only under?2004). Stripping controls on the daemon side in unbracketed mode was rejected for a patch release because it changes that automation surface.Cascade: REQ-804 wording,
docs/explanation/input.md"Confirmation bar", CHANGELOG (Fixed). Tests inconfirm.rs:^O,ESC,^Cwithout a newline raise the bar; HT alone does not.