mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-05-13 21:26:27 +02:00
parent
170c078440
commit
ad262f1146
19
src/app.rs
19
src/app.rs
@ -50,6 +50,7 @@ pub fn app() -> App<'static, 'static> {
|
|||||||
App::new("ripgrep")
|
App::new("ripgrep")
|
||||||
.author(crate_authors!())
|
.author(crate_authors!())
|
||||||
.version(crate_version!())
|
.version(crate_version!())
|
||||||
|
.long_version(LONG_VERSION.as_str())
|
||||||
.about(ABOUT)
|
.about(ABOUT)
|
||||||
.max_term_width(100)
|
.max_term_width(100)
|
||||||
.setting(AppSettings::UnifiedHelpMessage)
|
.setting(AppSettings::UnifiedHelpMessage)
|
||||||
@ -194,6 +195,24 @@ macro_rules! doc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
lazy_static! {
|
lazy_static! {
|
||||||
|
static ref LONG_VERSION: String = {
|
||||||
|
let mut features: Vec<&str> = vec![];
|
||||||
|
|
||||||
|
if cfg!(feature = "avx-accel") {
|
||||||
|
features.push("+avx-accel");
|
||||||
|
} else {
|
||||||
|
features.push("-avx-accel");
|
||||||
|
}
|
||||||
|
|
||||||
|
if cfg!(feature = "simd-accel") {
|
||||||
|
features.push("+simd-accel");
|
||||||
|
} else {
|
||||||
|
features.push("-simd-accel");
|
||||||
|
}
|
||||||
|
|
||||||
|
format!("{}, with features (+/-): {}", crate_version!(), features.join(" "))
|
||||||
|
};
|
||||||
|
|
||||||
static ref USAGES: HashMap<&'static str, Usage> = {
|
static ref USAGES: HashMap<&'static str, Usage> = {
|
||||||
let mut h = HashMap::new();
|
let mut h = HashMap::new();
|
||||||
doc!(h, "help-short",
|
doc!(h, "help-short",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user