[codex] fix Oh My Zsh completion compinit setup#1033
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe zsh installer is modified to skip Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Review rate limit: 6/8 reviews remaining, refill in 12 minutes and 1 second.Comment |
alfred-openspec
left a comment
There was a problem hiding this comment.
Looks good. The change keeps OMZ in charge of fpath/compinit while preserving auto-configuration for standard zsh, and the test coverage now locks in the no-.zshrc-mutation behavior.
Summary
.zshrcfor Oh My Zsh zsh completion installs._openspecinto OMZcustom/completions, letting OMZ managefpathandcompinititself..zshrcunchanged and do not inject OpenSpeccompinitlines.Root Cause
The installer detected Oh My Zsh for the completion script path, but still called the generic zsh
.zshrcconfigurator when the OMZ completions directory was not already referenced. That generic block prependedautoload -Uz compinitandcompinitbeforesource "$ZSH/oh-my-zsh.sh", causing zsh's raw insecure-directory prompt before OMZ's own guarded completion initialization could run.Fixes #1018.
Validation
pnpm exec vitest run test/core/completions/installers/zsh-installer.test.tspnpm run lintpnpm run build.zshrcremained unchanged while_openspecwas installed undercustom/completions.Summary by CodeRabbit