Skip to content

feat(tui): display chained shell commands across multiple lines - #42052

Open
fowlmouth wants to merge 1 commit into
anomalyco:devfrom
fowlmouth:feat-tui-breakup-lines
Open

feat(tui): display chained shell commands across multiple lines#42052
fowlmouth wants to merge 1 commit into
anomalyco:devfrom
fowlmouth:feat-tui-breakup-lines

Conversation

@fowlmouth

Copy link
Copy Markdown

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

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

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.ts covering the permission metadata flow:

  • Chained command splits into echo foo \\\n&& echo bar \\\n&& echo baz
  • Single command is returned unchanged
  • && inside quotes is not split (echo "a && b" \\\n&& echo c)

Ran bun test test/tool/shell.test.ts from packages/opencode: 26 pass, 0 fail.

Screenshots / recordings

Screenshot 2026-08-12 at 11 04 07 AM

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Add commandDisplay field to shell tool that splits &&-chained commands
with backslash continuations for readable display in the session view
and permission prompt.
@fowlmouth
fowlmouth force-pushed the feat-tui-breakup-lines branch from 0c753fb to cd2f5b5 Compare August 12, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant