Repository navigation
Fix literal tildes in terminal-inserted paths - #9734
Conversation
|
Warning Review limit reached
Next review available in: 26 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Tagged dev verification on HEAD
The focused Swift Testing suite also executed all 3 |
Summary
~characters in the shared terminal shell escaper used by paste, drag and drop, file explorer insertion, image transfer, and upload fallback paths.~md/Mobile Documents/invest, passes the cmux-escaped relative path to a clean/bin/zsh -f, and verifies that zsh enters the literal directory.Refs #9680.
Issue analysis
The exact command in #9680 contains an unescaped space:
cd /Users/ren/Library/Mobile Documents/iCloud~md~obsidian/Documents/investThat command is split into two arguments by zsh, which selects the documented
cd old newform. Bare zsh and zsh with cmux integration sourced both emit the samestring not in pwderror. Quoting the path or escaping the space succeeds. The mid-tokeniCloud~md~obsidiansegment is not treated as named-directory syntax.The investigation did uncover a related cmux-owned edge case: the shared app insertion escaper did not escape a literal tilde at the start of a token, so a relative path such as
~md/Mobile Documents/investwas interpreted by zsh as a named directory. This PR fixes that shared boundary and does not claim the cwd integration emitted the original error.Testing
zsh:1: no such user or named directory: md.swift test --package-path Packages/macOS/CmuxTerminal --filter TerminalShellEscapingTestsswift test --package-path Packages/macOS/CmuxTerminal(178 Swift Testing tests and 11 XCTest tests passed)./scripts/reload.sh --tag issue-9680-cd-space-tilde-pathDemo Video
Not applicable: this is deterministic non-visual shell escaping behavior.
Checklist
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Escape literal
~in terminal-inserted paths so zsh doesn’t treat them as home or named directories. Adds a regression test to cover~md/...paths; addresses an edge case found while investigating #9680.~in the shared terminal shell escaper used by paste, drag-and-drop, file explorer insertion, image transfer, and upload fallback.~md/Mobile Documents/invest, runs/bin/zsh -f, and verifiescdenters the literal directory.Written for commit 4bfa6df. Summary will update on new commits.