+use super::available_commands;
+use crate::configuration::Configuration;
use std::io::Result;
pub struct Help;
vec![]
}
- fn execute(&self, input: Option<&String>) -> Result<()> {
- println!("Help: {:?}!", input);
- return Ok(())
+ fn execute(&self, _: Option<&String>, _: &Configuration, _: &str) -> Result<()> {
+ let commands = available_commands();
+ println!("Usage:");
+ println!();
+ for command in commands {
+ print!("blog {} ", command.command());
+ println!("{}", command.help());
+ }
+ Ok(())
}
fn after_dependencies(&self) -> Vec<Box<dyn super::Command>> {