|
|
|
|
@ -2,7 +2,9 @@ use crate::info::langs::language::{Language, LanguageType};
@@ -2,7 +2,9 @@ use crate::info::langs::language::{Language, LanguageType};
|
|
|
|
|
use crate::info::utils::info_field::InfoType; |
|
|
|
|
use crate::ui::printer::SerializationFormat; |
|
|
|
|
use anyhow::Result; |
|
|
|
|
use clap::builder::styling::AnsiColor; |
|
|
|
|
use clap::builder::PossibleValuesParser; |
|
|
|
|
use clap::builder::Styles; |
|
|
|
|
use clap::builder::TypedValueParser as _; |
|
|
|
|
use clap::{value_parser, Args, Command, Parser, ValueHint}; |
|
|
|
|
use clap_complete::{generate, Generator, Shell}; |
|
|
|
|
@ -20,9 +22,15 @@ use strum::IntoEnumIterator;
@@ -20,9 +22,15 @@ use strum::IntoEnumIterator;
|
|
|
|
|
const COLOR_RESOLUTIONS: [&str; 5] = ["16", "32", "64", "128", "256"]; |
|
|
|
|
pub const NO_BOTS_DEFAULT_REGEX_PATTERN: &str = r"(?:-|\s)[Bb]ot$|\[[Bb]ot\]"; |
|
|
|
|
|
|
|
|
|
const STYLES: Styles = Styles::styled() |
|
|
|
|
.header(AnsiColor::Yellow.on_default()) |
|
|
|
|
.usage(AnsiColor::Green.on_default()) |
|
|
|
|
.literal(AnsiColor::Green.on_default()) |
|
|
|
|
.placeholder(AnsiColor::Green.on_default()); |
|
|
|
|
|
|
|
|
|
#[derive(Clone, Debug, Parser, PartialEq, Eq)] |
|
|
|
|
#[command(version, about)] |
|
|
|
|
#[command(styles = clap_cargo::style::CLAP_STYLING)] |
|
|
|
|
#[command(styles = STYLES)] |
|
|
|
|
pub struct CliOptions { |
|
|
|
|
/// Run as if onefetch was started in <input> instead of the current working directory
|
|
|
|
|
#[arg(default_value = ".", hide_default_value = true, value_hint = ValueHint::DirPath)] |
|
|
|
|
|