3

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.

  • It appears to be caching related per code in Completion/compinstall so that that code can find a non-default location for what is usually ~/.zshrc (which subsequent code looks for if the style is unset). – thrig Dec 12 '18 at 16:45
2

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.