add about and version to -h and --help

This commit is contained in:
Mark 2024-10-11 22:54:56 +02:00
parent bdd7260c12
commit 08999e646a
2 changed files with 7 additions and 2 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "mers" name = "mers"
version = "0.9.6" version = "0.9.7"
edition = "2021" edition = "2021"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
description = "dynamically typed but type-checked programming language" description = "dynamically typed but type-checked programming language"
@ -15,7 +15,7 @@ default = ["colored-output"]
colored-output = ["mers_lib/ecolor-term", "mers_lib/pretty-print", "dep:colored"] colored-output = ["mers_lib/ecolor-term", "mers_lib/pretty-print", "dep:colored"]
[dependencies] [dependencies]
mers_lib = "0.9.6" mers_lib = "0.9.7"
# mers_lib = { path = "../mers_lib" } # mers_lib = { path = "../mers_lib" }
clap = { version = "4.3.19", features = ["derive"] } clap = { version = "4.3.19", features = ["derive"] }
colored = { version = "2.1.0", optional = true } colored = { version = "2.1.0", optional = true }

View File

@ -5,6 +5,11 @@ use std::{path::PathBuf, process::exit, sync::Arc};
mod cfg_globals; mod cfg_globals;
#[derive(Parser)] #[derive(Parser)]
#[command(version,
about = Some("mers - a type-checked, dynamically typed programming language focusing on safety and simplicity.\n run with --help for more info :)"),
long_about = Some("mers - a type-checked, dynamically typed programming language focusing on safety and simplicity.
Safety in mers means that a valid, type-checked mers program will not crash at runtime, and that mers tries to make writing \"bad\" code difficult.
Simplicity means that mers is easy to learn, it has little syntax and few edge-cases, but it does not mean that it is easy to write."))]
struct Args { struct Args {
#[command(subcommand)] #[command(subcommand)]
command: Command, command: Command,