Repository navigation
Keep set-buffer text exact and read it from stdin - #14836
Conversation
These fail on main: set-buffer trims leading and trailing whitespace and newlines from its argument, and with no argument it errors instead of reading stdin (a lone `-` is stored literally). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
set-buffer trimmed whitespace and newlines from its text, so a buffer could never end in a newline or keep leading indentation, and it had no way to take piped input. It now stores the text exactly as given, like tmux, and reads stdin when no text argument (or a lone `-`) is passed, so `cmd | cmux set-buffer` followed by `cmux paste-buffer` moves output between panes intact. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 19 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: manaflow-ai/cmux/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
All contributors have signed the CLA ✍️ ✅ |
|
Merge receipt for |
413ece1 CI tooling, guard and test hardening (manaflow-ai#14864) a4e4aa4 Keep set-buffer text exact and read it from stdin (manaflow-ai#14836) 83ed511 Tighten welcome, cmux-cua build, and codex wrapper follow-ups (manaflow-ai#14857) 8c9d2c9 perf: keep the durable event log open across flushes (manaflow-ai#14829) 6d876f9 Send the PTY paste test's Cmd+V to a first-responder terminal (manaflow-ai#14825) f190c87 Re-supply user-declared external agent launchers on resume (manaflow-ai#10503) d522606 web: render changelog features as patch notes cards (manaflow-ai#14869) b5d0bff Stop other bundles and scripts from killing the running cmux (manaflow-ai#14831) # Conflicts: # .github/workflows/ci-main-full-suite.yml
Summary
cmux set-buffertrimmed whitespace and newlines from its text, so a buffer could never end in a newline or keep leading indentation, and it had no way to take piped input. Moving output from one pane to another meant copying it through the macOS clipboard.set-buffernow stores the text exactly as given, like tmux, and reads stdin when there is no text argument or the argument is a lone-. With a terminal on stdin and no text it still fails with "set-buffer requires text" instead of waiting for EOF.cmux read-screen --surface surface:1 --lines 40 | cmux set-buffer --name out cmux paste-buffer --name out --surface surface:2Whitespace-only text is now accepted (tmux accepts it too); only empty text is rejected.
paste-bufferitself is unchanged.Testing
cmuxCLITests/CLITmuxCompatBufferContentTests.swiftruns the bundled CLI against a scratchHOMEand checks the stored buffer for: piped stdin with indentation and a trailing blank line,-, an argument with leading spaces and a trailing newline, and empty stdin (fails, nothing written).scripts/verify-local.pyproject, test-wiring, localization and Swift syntax checks passed. I did not build or run the tests locally; they run in CI.cli.setBuffer.error.invalidUTF8), translated for all nine macOS locales;localization_catalog.py checkreports 0 parity errors. The changedset-bufferhelp text is one of the existing unlocalized tmux-compat help blocks.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
set-buffernow stores text exactly as given, like tmux, instead of trimming whitespace and newlines, and reads from stdin when no text argument (or-) is passed.cmd | cmux set-bufferthenpaste-buffer.CLITmuxCompatBufferContentTestscovering piped stdin,-, argument preservation, and empty stdin.Written for commit f2d114f. Summary will update on new commits.