This change enables the use of arrow keys during ciel new and ciel config.
Dialoguer's documentation doesn't clearly state the difference between the two methods. When dealing with arrow key presses, interact records them as characters, whereas interact_text moves the cursor accordingly.
Demo
#!/usr/bin/env cargo-play
//# dialoguer = "0.10"
use dialoguer::theme::ColorfulTheme;
use dialoguer::Input;
fn main() {
let theme = ColorfulTheme::default();
let input: String = Input::with_theme(&theme)
.with_prompt("Arrow keys work here")
.interact_text()
.unwrap();
println!("Result: {}", input);
let _: String = Input::with_theme(&theme)
.with_prompt("UwU Senpai")
.interact()
.unwrap();
println!("Result: {}", input);
}
This change enables the use of arrow keys during
ciel new
andciel config
.Dialoguer's documentation doesn't clearly state the difference between the two methods. When dealing with arrow key presses,
interact
records them as characters, whereasinteract_text
moves the cursor accordingly.Demo