From 6e9e040bf85dd27e503a8c7f70b3e4d360c40d58 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 13 Oct 2020 00:55:05 +0100 Subject: [PATCH] x.py: setup: Offer keywords in interactive prompt We understand these profile names because we use .to_str(). Mention them in the question. Signed-off-by: Ian Jackson --- src/bootstrap/setup.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bootstrap/setup.rs b/src/bootstrap/setup.rs index 85b361e16a3..2119747d9e1 100644 --- a/src/bootstrap/setup.rs +++ b/src/bootstrap/setup.rs @@ -40,7 +40,7 @@ impl Profile { pub fn all_for_help(indent: &str) -> String { let mut out = String::new(); for choice in Profile::all() { - writeln!(&mut out, "{}{}", indent, choice).unwrap(); + writeln!(&mut out, "{}{}: {}", indent, choice, choice.purpose()).unwrap(); } out } @@ -143,7 +143,7 @@ pub fn interactive_path() -> io::Result { let mut input = String::new(); println!("Welcome to the Rust project! What do you want to do with x.py?"); for (letter, profile) in abbrev_all() { - println!("{}) {}", letter, profile.purpose()); + println!("{}) {}: {}", letter, profile, profile.purpose()); } let template = loop { print!(