-
Notifications
You must be signed in to change notification settings - Fork 0
/
.chezmoi.toml.tmpl
33 lines (27 loc) · 970 Bytes
/
.chezmoi.toml.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{{- /* Checks if running interactively, which is not the case for GitHub Codespaces */ -}}
{{- $interactive := stdinIsATTY -}}
{{- /* Initializes the name variable with a default value */ -}}
{{- $name := "Leif Walsh" -}}
{{- /* If name was previously set, reuses it */ -}}
{{- if hasKey . "name" -}}
{{- $name = .name -}}
{{- /* Otherwise, if running interactively, prompts for a name */ -}}
{{- else if $interactive -}}
{{- $name = promptString "name" $name -}}
{{- end -}}
{{- /* Does the same for the email */ -}}
{{- $email := "[email protected]" -}}
{{- if hasKey . "email" -}}
{{- $email = .email -}}
{{- else if $interactive -}}
{{- $email = promptString "email" $email -}}
{{- end -}}
{{- if $interactive -}}
{{- writeToStdout "💡 Tip: you can re-enter your name and email with `chezmoi init --data=false`.\n" -}}
{{- end -}}
sourceDir = "{{ .chezmoi.sourceDir }}"
[data]
name = "{{ $name }}"
email = "{{ $email }}"
[diff]
command = "delta"