2023-04-11 20:57:02 -07:00
|
|
|
{{- if (eq .host.headless true) }}
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
# @file ZSH Pre-Initialization
|
|
|
|
# @brief Ensures ZSH is pre-initialized by invoking ZSH and allowing it to perform "first-run" tasks
|
|
|
|
# @description
|
|
|
|
# This script ensures that the first time you open a ZSH terminal session everything is loaded as fast as possible.
|
|
|
|
# It does this by invoking ZSH in the background during the provisioning process so that "first-run" tasks such
|
|
|
|
# as cache-building are handled ahead of time.
|
|
|
|
|
2023-04-18 22:15:21 -07:00
|
|
|
# .zshrc hash: {{ include (joinPath .chezmoi.homeDir ".zshrc") | sha256sum }}
|
2023-04-11 20:57:02 -07:00
|
|
|
|
|
|
|
{{ includeTemplate "universal/profile" }}
|
|
|
|
{{ includeTemplate "universal/logg" }}
|
|
|
|
|
|
|
|
### Initialize ZSH so plugin bootstrap process is done ahead of time
|
|
|
|
if command -v zsh > /dev/null; then
|
|
|
|
logg info 'Bootstrapping ZSH by running `exec zsh && exit 0`'
|
|
|
|
exec zsh && exit 0
|
|
|
|
fi
|
|
|
|
{{ end -}}
|