12

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.

maxschlepzig
  • 57,532
  • 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

1 Answers1

7

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

  • permalink: https://github.com/zsh-users/zsh/blob/c7da34dd71966bfa0531cb87414c103c989f205c/Completion/compinstall#L52 – maxschlepzig May 21 '20 at 07:33