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 <ijackson@chiark.greenend.org.uk>
This commit is contained in:
parent
b7c6041df1
commit
6e9e040bf8
1 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ impl Profile {
|
||||||
pub fn all_for_help(indent: &str) -> String {
|
pub fn all_for_help(indent: &str) -> String {
|
||||||
let mut out = String::new();
|
let mut out = String::new();
|
||||||
for choice in Profile::all() {
|
for choice in Profile::all() {
|
||||||
writeln!(&mut out, "{}{}", indent, choice).unwrap();
|
writeln!(&mut out, "{}{}: {}", indent, choice, choice.purpose()).unwrap();
|
||||||
}
|
}
|
||||||
out
|
out
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,7 @@ pub fn interactive_path() -> io::Result<Profile> {
|
||||||
let mut input = String::new();
|
let mut input = String::new();
|
||||||
println!("Welcome to the Rust project! What do you want to do with x.py?");
|
println!("Welcome to the Rust project! What do you want to do with x.py?");
|
||||||
for (letter, profile) in abbrev_all() {
|
for (letter, profile) in abbrev_all() {
|
||||||
println!("{}) {}", letter, profile.purpose());
|
println!("{}) {}: {}", letter, profile, profile.purpose());
|
||||||
}
|
}
|
||||||
let template = loop {
|
let template = loop {
|
||||||
print!(
|
print!(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue