Skip to content

[codex] Adopt zinit and Oh My Posh shell startup#9

Merged
gsantovena merged 3 commits into
mainfrom
modular-zshrc
May 11, 2026
Merged

[codex] Adopt zinit and Oh My Posh shell startup#9
gsantovena merged 3 commits into
mainfrom
modular-zshrc

Conversation

@gsantovena

@gsantovena gsantovena commented May 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replace the monolithic zshrc with a thin loader for focused zsh/*.zsh modules.
  • Move shell startup to zinit-managed plugins/snippets, including OMZL::directories.zsh for ... traversal aliases.
  • Replace Powerlevel10k prompt setup with Oh My Posh using tracked configs in ohmyposh/ linked to ~/.config/ohmyposh.
  • Keep shared shell exports available from both bash and zsh, and refresh dotfiles_s.gif to show the current install flow.
  • Clean up stale docs/placeholders, update the DevOps improvement plan, and remove legacy vimrc naming from Neovim config reload hooks.
  • Guard optional shell integrations (fzf, zoxide, Oh My Posh) so fresh installs stay quiet until Brewfile tools are present.

Why

The shell configuration has moved from direct Oh My Zsh/Powerlevel10k startup to zinit-managed plugin loading with Oh My Posh as the prompt engine. The repo now documents and tests that current stack while preserving symlink installer behavior. Follow-up cleanup also removed stale documentation claims and reduced first-run shell startup noise.

Validation

  • make check
  • oh-my-posh init zsh --config ohmyposh/zen.toml
  • nvim --headless -u nvim/init.vim '+lua require("config.autocmds"); require("config.personal")' +qa
  • git diff --check

Improvement plan captured

See DEVOPS_RECOMMENDATIONS.md for the current backlog:

  • extract install metadata into a shared manifest
  • add optional component install selection
  • add explicit shell diagnostics/doctor checks
  • organize Brewfile package groups
  • add security-scan fixtures

Notes

  • Local ignored migration backup zsh/00-oh-my-zsh.zsh.bak was removed from the working tree and was never committed.
  • Visual prompt rendering and interactive Neovim popup rendering were not separately tested.

gsantovena and others added 2 commits May 10, 2026 11:10
Split the monolithic zshrc into focused zsh/*.zsh modules so shell startup can move from direct Oh My Zsh initialization to zinit-managed snippets and plugins. Keep shared shell exports available from both bash and zsh, restore Oh My Zsh directory traversal aliases through OMZL::directories.zsh, and refresh the repository GIF to match the current install flow.

Constraint: Preserve symlink-based installer behavior while changing shell startup structure
Rejected: Keep all zsh configuration in zshrc | makes the zinit migration harder to test and maintain
Rejected: Commit local .bak migration artifact | ignored backup file is not part of the runtime configuration
Confidence: high
Scope-risk: moderate
Directive: Keep zshrc as a thin module loader; add new shell concerns under zsh/*.zsh and cover them with syntax tests
Tested: make check
Not-tested: Interactive zinit plugin download in a fresh login shell

Co-authored-by: OmX <omx@oh-my-codex.dev>
Powerlevel10k was removed from the zinit bootstrap, so the repo now needs Oh My Posh to be the documented and installed prompt boundary. This keeps the prompt config under ~/.config/ohmyposh through the existing symlink installer, records the Homebrew dependency, and updates tests so future shell changes verify the new prompt wiring.

Constraint: Preserve the modular zsh startup and symlink installer behavior already on this branch
Rejected: Leave prompt setup unguarded | missing oh-my-posh would print startup errors before Brewfile setup runs
Rejected: Keep README Oh My Zsh install instructions | zinit now bootstraps plugin loading directly
Confidence: high
Scope-risk: narrow
Directive: Keep prompt themes in ohmyposh/ and link them via CONFIG_FILES instead of sourcing machine-local paths
Tested: make check
Not-tested: Visual prompt rendering in an interactive terminal profile

Co-authored-by: OmX <omx@oh-my-codex.dev>
@gsantovena gsantovena changed the title [codex] Adopt zinit-backed modular zsh startup [codex] Adopt zinit and Oh My Posh shell startup May 10, 2026
The zinit and Oh My Posh migration left a few low-signal seams: generated-looking documentation placeholders, outdated DevOps analysis, legacy vimrc naming in Neovim callbacks, duplicate shell initialization, and unguarded optional shell integrations. This pass removes those stale edges while keeping runtime behavior and install defaults intact.

Constraint: Preserve the existing modular zsh branch and avoid package/plugin pruning without a separate usage audit
Rejected: Add a new project wiki in this pass | improvement planning belongs in the existing docs until wiki ownership is decided
Rejected: Delete broad Brewfile entries opportunistically | package removals need usage evidence
Confidence: high
Scope-risk: moderate
Directive: Keep future cleanup passes test-backed and separate cosmetic doc refreshes from behavior-changing config removals
Tested: make check; oh-my-posh init zsh --config ohmyposh/zen.toml; nvim --headless -u nvim/init.vim '+lua require("config.autocmds"); require("config.personal")' +qa; git diff --check
Not-tested: Interactive Neovim autocommand popup rendering in a GUI terminal

Co-authored-by: OmX <omx@oh-my-codex.dev>
@gsantovena gsantovena marked this pull request as ready for review May 11, 2026 03:51
@gsantovena gsantovena merged commit d4301c1 into main May 11, 2026
5 checks passed
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.

1 participant