Skip to content

Commit f026ea1

Browse files
authored
Merge pull request #24 from code-troopers/fix/22
fix(#22): better help message
2 parents 924037f + dcf1d8b commit f026ea1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,13 @@ fn main() -> Result<(), String> {
5353

5454
fn help(ct_file: &CTFile) -> String{
5555
let mut help : Vec<String> = Vec::new();
56+
help.push("Default commands :".green().to_string());
57+
help.push(format!("\t• {} runs a server on http://localhost:1500 to see other used ports 👂", "ports".blue()));
58+
help.push(format!("\t• {} provide manual from content {{name}} of README.md 📖", "man {name}".blue()));
59+
help.push(String::from(""));
60+
help.push(format!("Declared aliases found in {} :", ct_file.path).green().to_string());
5661
for (alias, command )in RunCommand::all(&ct_file.content, None){
57-
help.push(format!("{} {} {} {}", alias.blue(), command.command.green(), command.args.join(" ").green(), command.doc.red()));
62+
help.push(format!("\t• {} runs {} {} {}", alias.blue(), command.command.green(), command.args.join(" ").green(), command.doc.red()));
5863
}
5964
help.join("\n")
6065
}

0 commit comments

Comments
 (0)