1pub mod colors;
2pub mod console;
3pub mod formatting;
4pub mod renderable;
5use std::rc::Rc;
6
7use crate::{
8 engine::structs::{CmdInfo, Engine, ErrorType},
9 tooling::formatting::help::generate_help,
10};
11
12pub fn help_handler(e: &mut Engine, _: &[&str]) -> ErrorType {
13 println!("{}", generate_help(e));
14 Ok(())
15}
16
17pub fn add_help_handler<'a>(names: Vec<&'a str>, e: &mut Engine<'a>) {
18 e.new_commands(
19 names,
20 CmdInfo::new(
21 Rc::new(help_handler),
22 vec![],
23 vec![],
24 false,
25 "Generate and print help message",
26 ),
27 );
28}