Repository navigation
Read the cd directive file as-is in every shell wrapper - #4608
Merged
Merged
Conversation
wt wrote the target path followed by a newline, and each reader removed it its own way: fish, PowerShell and Nushell trimmed all surrounding whitespace, bash and zsh dropped trailing newlines, and wt's own existence check stripped line terminators. A directory whose name ends in a space worked in bash and zsh but not in fish, PowerShell or Nushell. wt now writes the bare path, and every reader takes the contents as-is: fish reads with `string collect`, PowerShell and Nushell drop their trims, and wt's existence check no longer strips anything. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
worktrunk-bot
approved these changes
Oct 27, 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.
wt wrote the
cdtarget followed by a newline, and each reader removed it its own way: fish, PowerShell and Nushell trimmed all surrounding whitespace, bash and zsh dropped trailing newlines, and wt's existence check from #4602 stripped line terminators. So a directory whose name ends in a space worked in bash and zsh but not in the other three.wt now writes the bare path, and every reader takes the contents as-is: fish reads with
string collect, PowerShell and Nushell drop their trims, and wt's existence check strips nothing. I checked all five wrapperscdinto a directory nameddir(fish failed before).A hand-written directive ending in a newline (a hook using
echo) is now read with the newline included; wt's own writes and the tests already use the bare path.