Skip to content

Commit

Permalink
fix: adjust cli help interface to include docs generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ph0enixKM committed Mar 4, 2024
1 parent 5d21652 commit 838ad6d
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions src/cli/cli_interface.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use heraclitus_compiler::prelude::*;
use colored::Colorize;
use colored::{Colorize, CustomColor};
use crate::compiler::AmberCompiler;
use super::flag_registry::FlagRegistry;
use std::env;
Expand Down Expand Up @@ -127,20 +127,29 @@ impl CLI {
else {
println!("{}'s compiler", self.name);
println!("Version {}\n", self.version);
println!("USAGE:\t\t\t\tEXAMPLE:");
println!("{}", "For evaluation:".dimmed());
println!("{}", " USAGE ".custom_color(CustomColor{r: 255, g: 255, b: 255}).on_color("#000"));
println!("{}", "For evaluation:".bold());
{
let example = format!("{} foo{}", self.exe_name, self.ext).dimmed();
println!("\t{} [INPUT]\t\t{}", self.exe_name, example);
println!(" {} [INPUT]", self.exe_name);
println!("{}", format!(" {} foo{}\n", self.exe_name, self.ext).dimmed());
}
{
let example = format!("{} -e \"\\$echo Hello World\\$\"", self.exe_name).dimmed();
println!("\t{} -e [EXPR]\t\t{}", self.exe_name, example);
println!(" {} -e [EXPR]", self.exe_name);
println!("{}", format!(" {} -e \"\\$echo Hello World\\$\"\n", self.exe_name).dimmed());
}
println!("{}", "For compiling:".dimmed());
println!("{}", "For compiling:".bold());
{
let example = format!("{} foo{} bar{}", self.exe_name, self.ext, self.ext).dimmed();
println!("\t{} [INPUT] [OUTPUT]\t{}", self.exe_name, example);
println!(" {} [INPUT] [OUTPUT]", self.exe_name);
println!("{}", format!(" {} foo{} bar{}\n", self.exe_name, self.ext, self.ext).dimmed());
}
println!("{}", "For documentation generation:".bold());
{
println!(" {} docs [INPUT]", self.exe_name);
println!("{}", format!(" {} docs foo{}\n", self.exe_name, self.ext).dimmed());
}
{
println!(" {} docs [INPUT] [OUTPUT DIR]", self.exe_name);
println!("{}", format!(" {} docs foo{} docs/", self.exe_name, self.ext).dimmed());
}
}
}
Expand Down

0 comments on commit 838ad6d

Please sign in to comment.