feat(tui): display chained shell commands across multiple lines - #42052
Open
fowlmouth wants to merge 1 commit into
Open
feat(tui): display chained shell commands across multiple lines#42052fowlmouth wants to merge 1 commit into
fowlmouth wants to merge 1 commit into
Conversation
Add commandDisplay field to shell tool that splits &&-chained commands with backslash continuations for readable display in the session view and permission prompt.
fowlmouth
force-pushed
the
feat-tui-breakup-lines
branch
from
August 12, 2026 15:17
0c753fb to
cd2f5b5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add commandDisplay field to shell tool that splits &&-chained commands with backslash continuations for readable display in the session view and permission prompt.
Issue for this PR
N/A
Type of change
What does this PR do?
Long-chained shell commands quickly become difficult to read. This PR is splitting the output so that '&& command2 ...' is on a new line. To enhance readability.
How did you verify your code works?
Added three cases to
packages/opencode/test/tool/shell.test.tscovering the permission metadata flow:echo foo \\\n&& echo bar \\\n&& echo baz&&inside quotes is not split (echo "a && b" \\\n&& echo c)Ran
bun test test/tool/shell.test.tsfrompackages/opencode: 26 pass, 0 fail.Screenshots / recordings
Checklist