{{- $email := promptString "Git main email address " ""}} {{- $mbsyncAccountNumber := promptInt "How many mbsync accounts would you generate " 0 }} {{- $mbsyncAccountNumber = $mbsyncAccountNumber | int -}} [data] email = {{ $email | quote }} {{- if gt $mbsyncAccountNumber 0 -}} {{- range $i, $e := until $mbsyncAccountNumber -}} {{ $mbsyncAccountName := promptString "MbSync account name " }} {{ $mbsyncAccountMail := promptString "MbSync account mail " }} {{ $mbsyncAccountUser := promptString "MbSync account user " }} {{ $mbsyncAccountHost := promptString "MbSync account host " }} [[data.mbsync]] name = {{ $mbsyncAccountName | quote }} mail = {{ $mbsyncAccountMail | quote }} user = {{ $mbsyncAccountUser | quote }} host = {{ $mbsyncAccountHost | quote }} {{- end -}} {{- end -}}