Repository navigation
feat(tui): highlight Bash commands - #42214
Closed
kitlangton wants to merge 3 commits into
Closed
kitlangton wants to merge 3 commits into
kitlangton wants to merge 3 commits into
Conversation
kitlangton
force-pushed
the
bash-highlighting
branch
from
August 13, 2026 02:47
1dec009 to
effb48e
Compare
This was referenced Oct 12, 2026
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.
What
Highlight Bash syntax wherever commands are shown or edited in the TUI:
!Shell-mode prompt input while the user typesKeywords, strings, variables, comments, and punctuation use the active TUI syntax theme.
How
packages/tui/src/component/prompt/index.tsxparses Shell-mode input as Bash after edits and applies the resulting theme styles directly to the textarea edit buffer. Stale asynchronous parser results are discarded, and highlights are removed when the input changes or Shell mode closes.packages/tui/src/routes/session/index.tsxrenders submitted Shell-mode commands and agent shell commands with the native<code filetype="bash">component.Scope
This changes TUI presentation only. It does not change command execution, shell selection, or tool behavior.
Testing
bun typecheckfrompackages/tuibun run testfrompackages/tui(689 passed, 5 skipped)git diff --checkDemo
Shell-mode editing
The recording shows
ls -la,git status --short && echo "clean", and a loop with a variable and comment.recording-0dfe3dcd-7316-4ef3-a873-f7d82da53199.mp4
Agent shell tool call
The recording shows an actual agent shell tool call with highlighted command syntax and real shell output.
recording-ce3e4e40-098f-4735-a3a6-ccd774ec1374.mp4