-
-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doc: Update 'use_git' example #1191
base: main
Are you sure you want to change the base?
Doc: Update 'use_git' example #1191
Conversation
Any feedback @sassman & @joshrotenberg ? |
@@ -40,19 +40,18 @@ Consider the following `cargo-generate.toml` file: | |||
```toml | |||
[placeholders] | |||
project_name = { prompt = "Enter project name", default = "my_project", type = "string" } | |||
use_git = { prompt = "Initialize Git repository?", choices = ["Yes", "No"], default = "Yes", type = "boolean" } | |||
use_git = { prompt = "Initialize Git repository?", default = true, type = "bool" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logically you're making sense here. However, the intent was to showcase the choices
.
So the better fix would be type = "string"
But maybe we keep this, and add a different example for choices
.
- `"editor"`: Represents a multiline string value, collected from the user by a real terminal editor. | ||
- `"boolean"`: Represents a boolean value (`true` or `false`). | ||
- `"bool"`: Represents a boolean value (`true` or `false`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!
Changes
use_git
example whereboolean
should bebool
use_git
example to removechoices
fieldContext
use_git example
If you attempt to run the
use_git
example as it is currently you'll receiveAnd, after you change it from
boolean
tobool
you'll receiveCTRL-D
The rendered page does not show CTRL-D