-
Notifications
You must be signed in to change notification settings - Fork 533
fix osc7 encoding for zsh (bad regex substitutions) #2578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughThis PR updates OSC 7 current-directory URL emission across shell integration scripts: bash_bashrc.sh, zsh_zshrc.sh, fish_wavefish.sh, and pwsh_wavepwsh.sh now emit OSC 7 URLs using the host prefix Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (3)
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
pkg/util/shellutil/shellintegration/zsh_zshrc.sh (1)
48-48: Optional: Consider separating declare and assign to allow return value inspection.Shellcheck flags SC2155 for declaring and assigning in one statement. While this is acceptable in the current context (since return values are not being checked), separating the declaration from the assignment would allow future error handling if needed.
If error handling is planned, consider:
local encoded_pwd encoded_pwd=$(_waveterm_si_urlencode "$PWD")
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
pkg/util/shellutil/shellintegration/zsh_zshrc.sh(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
pkg/util/shellutil/shellintegration/zsh_zshrc.sh (1)
pkg/util/shellutil/shellintegration/bash_bashrc.sh (2)
_waveterm_si_blocked(59-61)_waveterm_si_urlencode(63-73)
🪛 Shellcheck (0.11.0)
pkg/util/shellutil/shellintegration/zsh_zshrc.sh
[warning] 48-48: Declare and assign separately to avoid masking return values.
(SC2155)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build for TestDriver.ai
🔇 Additional comments (2)
pkg/util/shellutil/shellintegration/zsh_zshrc.sh (2)
34-41: Correct and explicit URL-encoding escapes.The explicit backslash escapes for special characters (%, space, #, &, ;, +) ensure these characters are treated literally in the glob pattern context, making the substitutions robust and preventing unintended special character interpretation. This aligns with proper parameter expansion syntax and mirrors the intent of the bash version.
49-49: Verify the OSC 7 URL construction change.The OSC 7 directory URL was changed from using a host variable to hardcoding
localhost. While this is valid for local shell integration, please confirm this is the intended fix and that it doesn't break functionality in any context (e.g., remote sessions, container environments). The original code may have used a dynamic host variable for a reason.
No description provided.