From a0ef50fdbadad99d1fdd9bef86a77170259ebcf6 Mon Sep 17 00:00:00 2001 From: Jeff LANCE Date: Mon, 4 Mar 2024 12:58:06 +0100 Subject: [PATCH] Up. --- home/.chezmoi.yaml.tmpl | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/home/.chezmoi.yaml.tmpl b/home/.chezmoi.yaml.tmpl index 01e8dc8..12286e0 100644 --- a/home/.chezmoi.yaml.tmpl +++ b/home/.chezmoi.yaml.tmpl @@ -1,5 +1,14 @@ -{{- $email := promptStringOnce . "email" "Email address" }} -{{- $mbsyncAccountNumber := promptIntOnce . "mbsyncAccountNumber" "How many mbsync accounts would you generate" }} +{{- $email := promptStringOnce . "email" "Email address " }} +{{- $mbsyncAccountNumber := promptIntOnce . "mbsyncAccountNumber" "How many mbsync accounts would you generate " }} + +{{- if $mbsyncAccountNumber gt 0 }} + {{- range $i, $e := until $mbsyncAccountNumber -}} + {{- $mbsyncAccountName := promptStringOnce . "mbsync.name" "MbSync account name " }} + {{- $mbsyncAccountMail := promptStringOnce . "mbsync.mail" "MbSync account mail " }} + {{- $mbsyncAccountUser := promptStringOnce . "mbsync.user" "MbSync account user " }} + {{- $mbsyncAccountHost := promptStringOnce . "mbsync.host" "MbSync account host " }} + {{- end -}} +{{- end -}} data: email: {{ $email | quote }}