What does zstyle :compinstall filename do

zsh

The Zsh first-run config wizard usually adds

zstyle :compinstall filename '$HOME/.zshrc'

to the newly generated ~/.zshrc.

What is the purpose of this directive? I could find some documentation on zstyle in general, but not on the specific config key.

Best Answer

It's for when you run compinstall again. It lets compinstall find where it has written out zstyle statements for you last time. This way, you can run compinstall again to update them.

You can read about it here in the source code: https://github.com/zsh-users/zsh/blob/master/Completion/compinstall#L52

Related Question