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
feat: support multiline custom placeholders #1074
Comments
or another idea, use dialoguer::Editor;
if let Some(rv) = Editor::new().edit("Enter a commit message").unwrap() {
println!("Your message:");
println!("{}", rv);
} else {
println!("Abort!");
} |
Ok I looked at the details, above idea with Editor should work no problem, but for multiline input, fn main() {
let mut buffer = String::new();
while std::io::stdin().read_line(&mut buffer).unwrap() != 0 {}
println!("{buffer}");
} Or also check for i would be happy to open a PR with theses features after hearing some feedback ! |
Hey @mirsella Interesting feature. I myself was not yet in the needs of a multi line input. But I saw that there is one thumbs up on the suggestion.
I would prefer this approach over a From a usability POV the editor approach already available in dialoguer seems even more charming. On the configuration part, somehow I would prefer to lower the complexity by simply adding a new type:
|
I'll work on a PR implementing edit: i'm a little busy now, but it's still on my plans |
Progress so far:
|
Hello !
It would be very useful to have the option to enter multi line input with custom placeholder, like copying and pasting a block which have multiple line.
Maybe something like this:
And then pasting this text, for example
Would work and set the two line in input instead of setting only
1 2
and3 4
going to the next placeholder.Thanks !
The text was updated successfully, but these errors were encountered: