diff --git a/home/.chezmoi.toml.tmpl b/home/.chezmoi.toml.tmpl index 584d67b..7a3c092 100644 --- a/home/.chezmoi.toml.tmpl +++ b/home/.chezmoi.toml.tmpl @@ -1,7 +1,7 @@ chezmoi:template:missing-key=zero [data] email = {{ promptString "Git main email address " "" | quote }} -{{- with promptInt "How many mbsync accounts would you generate " 0 -}}{{- $count := . | int }} +{{- with promptInt "How many mbsync accounts would you generate " -}}{{- $count := . | int }} {{- if gt $count 0 -}} {{- range $i, $e := until $count }} [[data.mbsync]] @@ -11,8 +11,10 @@ mail = {{ promptString "MbSync account mail " | quote }} user = {{ promptString "MbSync account user " | quote }} host = {{ promptString "MbSync account host " | quote }} {{- end }} -{{ else -}} +{{- end }} + +{{ else }} [[data.mbsync]] active = false -{{- end }} + {{- end }}