1
Fork 0
mirror of https://github.com/RGBCube/alejandra synced 2025-07-31 04:27:45 +00:00

feat: add version flag

This commit is contained in:
Kevin Amado 2022-02-16 20:26:07 -05:00
parent 1de952b26a
commit 93a88b35c3
No known key found for this signature in database
GPG key ID: FFF341057F503148
4 changed files with 4 additions and 1 deletions

1
Cargo.lock generated
View file

@ -62,6 +62,7 @@ dependencies = [
"atty", "atty",
"bitflags", "bitflags",
"indexmap", "indexmap",
"lazy_static",
"os_str_bytes", "os_str_bytes",
"strsim", "strsim",
"termcolor", "termcolor",

View file

@ -1,5 +1,5 @@
[dependencies] [dependencies]
clap = "*" clap = { version = "*", features = ["cargo"] }
indoc = "*" indoc = "*"
rand = "*" rand = "*"
rayon = "*" rayon = "*"

1
front/Cargo.lock generated
View file

@ -85,6 +85,7 @@ dependencies = [
"atty", "atty",
"bitflags", "bitflags",
"indexmap", "indexmap",
"lazy_static",
"os_str_bytes", "os_str_bytes",
"strsim", "strsim",
"termcolor", "termcolor",

View file

@ -1,6 +1,7 @@
pub fn parse(args: Vec<String>) -> clap::ArgMatches { pub fn parse(args: Vec<String>) -> clap::ArgMatches {
clap::App::new("Alejandra") clap::App::new("Alejandra")
.about("The Uncompromising Nix Code Formatter.") .about("The Uncompromising Nix Code Formatter.")
.version(clap::crate_version!())
.arg( .arg(
clap::Arg::new("debug") clap::Arg::new("debug")
.help("Enable debug mode.") .help("Enable debug mode.")