- fn execute(&self, input: Option<&String>) -> Result<()> {
- println!("Help: {:?}!", input);
+ fn execute(&self, _: Option<&String>) -> Result<()> {
+ let arguments: Vec<String> = args().collect();
+ let app_name = arguments.get(0).map_or("blog", |s| s.as_str());
+ let commands = available_commands();
+ println!("Usage:");
+ println!("");
+ for command in commands {
+ print!("{} {} ", app_name, command.command());
+ println!("{}", command.help());
+ }