-
Notifications
You must be signed in to change notification settings - Fork 155
Open
Labels
c-interactionsContext: InteractionsContext: Interactionst-bugType: Bug fixType: Bug fixz-all-promptsTag: All promptsTag: All prompts
Milestone
Description
Thanks for this crate, by the way. I could insert a simple terminal prompt without knowing too much about terminals!
Steps to reproduce.
Take this small test programm.
[package]
name = "dialoguer-bug"
version = "0.1.0"
edition = "2021"
[dependencies]
dialoguer = "0.9.0"
$ cat src/main.rs
fn main() {
let _ = dialoguer::Confirm::new().with_prompt("Prompt string with multiple lines:\nLine two?").interact().map_err(|e| e.to_string());
}
- Build and run the programm:
cargo r
- A confirmation prompt appears:
Prompt string with multiple lines:
Line two?
- Answer either yes or no (doesn't matter which).
- My answer is displayed in the terminal.
Expected result The terminal output looks like this:
Prompt string with multiple lines:
Line two yes
Actual result The prompt is printed twice, resulting in output like this.
Prompt string with multiple lines:
Prompt string with multiple lines:
Line two yes
Meta. Tested on both version 0.9 and 0.8 of dialoguer.
cyqsimon, jgrund, jmaximusix and rgwood-dd
Metadata
Metadata
Assignees
Labels
c-interactionsContext: InteractionsContext: Interactionst-bugType: Bug fixType: Bug fixz-all-promptsTag: All promptsTag: All prompts