diff --git a/assets/chezmoi.io/docs/reference/templates/init-functions/promptBool.md b/assets/chezmoi.io/docs/reference/templates/init-functions/promptBool.md index fe0a10a992e..9a9d101dbb5 100644 --- a/assets/chezmoi.io/docs/reference/templates/init-functions/promptBool.md +++ b/assets/chezmoi.io/docs/reference/templates/init-functions/promptBool.md @@ -1,9 +1,9 @@ # `promptBool` *prompt* [*default*] `promptBool` prompts the user with *prompt* and returns the user's response -interpreted as a boolean. If *default* is passed the user's response is empty -then it returns *default*. The user's response is interpreted as follows (case -insensitive): +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): | Response | Result | | ----------------------- | ------- | diff --git a/internal/cmd/interactivetemplatefuncs.go b/internal/cmd/interactivetemplatefuncs.go index 09b014bcce6..76340893c1a 100644 --- a/internal/cmd/interactivetemplatefuncs.go +++ b/internal/cmd/interactivetemplatefuncs.go @@ -77,7 +77,7 @@ func (c *Config) promptBoolOnceInteractiveTemplateFunc( args ...bool, ) bool { if len(args) > 1 { - err := fmt.Errorf("want 2 or 3 arguments, got %d", len(args)+2) + err := fmt.Errorf("want 3 or 4 arguments, got %d", len(args)+2) panic(err) }