Repository navigation
Conversation
Copy buttons copied shell commands with their trailing `#` comments. In zsh without `interactivecomments`, the default, a pasted trailing comment is passed to the command as arguments. `withoutTrailingShellComments` applies the shell's rule, that a `#` beginning an unquoted word starts a comment, to per-line copies, the command lines of single-command console blocks, and whole `bash` and `sh` blocks. A line that is only a comment stays. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013U96NY8qKtZhavBSwnfCYq
worktrunk-bot
approved these changes
Sep 13, 2026
1 task
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.
Copy buttons copied shell commands with their trailing
#comments, e.g.wt hook pre-merge user: # Run all user hooks. In zsh withoutinteractivecomments, which is the default, a pasted trailing comment isn't a comment: the command runs aswt hook pre-merge user: '#' Run all user hooks.withoutTrailingShellCommentsindocs/src/plugins/worktrunk-terminal.mjsapplies the shell's rule, that a#beginning an unquoted word starts a comment, to what shell copy buttons copy: each per-line button in multi-commandconsoleblocks, the command lines of single-commandconsoleblocks, and wholebashandshblocks. A line that is only a comment stays, asdocs/CLAUDE.mdalready specifies for console blocks. 56 of the site's 339 copy payloads change (47 per-line buttons and 9bashblocks). TOML, PowerShell and other payloads are unchanged, and a quoted#survives.Tests: unit tests for the scanner (quotes, escapes,
$#, operators, quotes spanning lines) and for a single-commandconsoleblock with a trailing comment, plus a built-site test that nobashorshpayload carries a trailing comment, which fails on the build before this change.🤖 Generated with Claude Code
https://claude.ai/code/session_013U96NY8qKtZhavBSwnfCYq