Skip to content

Read the cd directive file as-is in every shell wrapper - #4608

Merged
max-sixty merged 2 commits into
mainfrom
execute-removed-cd
Oct 27, 2026
Merged

max-sixty merged 2 commits into
mainfrom
execute-removed-cd

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

wt wrote the cd target 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 wrappers cd into a directory named dir (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.

This was written by Claude Code on behalf of max-sixty

max-sixty and others added 2 commits October 26, 2026 19:00
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]>
@max-sixty
max-sixty merged commit 882e7be into main Oct 27, 2026
38 checks passed
@max-sixty
max-sixty deleted the execute-removed-cd branch October 27, 2026 02:47
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.

2 participants