Skip to content

compinit injected by installer conflicts with Oh My Zsh #1018

@slyylepretre

Description

@slyylepretre

The installer adds the following block to .zshrc:

# OPENSPEC:START
# OpenSpec shell completions configuration
fpath=("/Users/<user>/.oh-my-zsh/custom/completions" $fpath)
autoload -Uz compinit
compinit
# OPENSPEC:END

When Oh My Zsh is present, this causes a warning on every shell launch:

zsh compinit: insecure directories and files, run compaudit for list.
Ignore insecure directories and files and continue [y] or abort compinit [n]?

Root cause: OMZ already calls compinit internally (in oh-my-zsh.sh). The installer's early compinit call fires before OMZ has finished configuring $fpath, triggering the security check with an incomplete path setup.

Fix: The installer should detect whether OMZ is active ($ZSH is set) and skip the autoload/compinit lines in that case — the fpath prepend alone is sufficient.

Workaround: Manually comment out the two compinit lines in the OPENSPEC:START block in your .zshrc.

Note: currently installed OMZ version -> 5.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions