Back to Chezmoi

`promptBool` *prompt* [*default*]

assets/chezmoi.io/docs/reference/templates/init-functions/promptBool.md

2.70.2440 B
Original Source

promptBool prompt [default]

promptBool prompts the user with prompt and returns the user's response interpreted as a boolean. If default is passed and the user's response is empty then it returns default. The user's response is interpreted as follows (case insensitive):

ResponseResult
1, on, t, true, y, yestrue
0, off, f, false, n, nofalse