chezmoi/Target/State
What does the Term target state mean in chezmoi? card
- The target state of a chezmoi/Target is the chezmoi-computed runtime value that answers: Given the value of the target file Declared in the dotfiles repo and the chezmoi configuration, what file contents should chezmoi write to the Home/Dir? It depends on chezmoi/.toml, EnvVars, etc.
- For the target state of the zsh/.zshrc, is the Declared representation of
dot_zshrc.tmpl, including everything configured about chezmoi, such as aspects of chezmoi/.toml such as how to handle templates, what context variables there are, the values of environment variables, etc.
Why it matters
It's a runtime construct or computational construct
- Target State as a term exists in chezmoi because a core assumption of how chezmoi is that people want to use Templating to manage their dotfiles.
- The target state of chezmoi/Target isn't just the contents of a particular file in the dotfiles repo. Well, technically, it could be, if it's literally just a file without any templating. But chezmoi has a runtime state that's influenced by its configuration files, environment variables, etc, and that runtime state potentially changes the interpretation of each target file.
- My Notes