1
0
mirror of https://github.com/sharkdp/bat synced 2026-07-22 16:53:19 +00:00

Add $LESSOPEN and $LESSCLOSE support (#2444)

This commit is contained in:
Anomalocaridid
2023-09-02 06:48:26 +00:00
committed by GitHub
parent 3abc0c0fc4
commit e32ad0b048
16 changed files with 748 additions and 4 deletions
+2
View File
@@ -281,6 +281,8 @@ impl App {
.map(HighlightedLineRanges)
.unwrap_or_default(),
use_custom_assets: !self.matches.get_flag("no-custom-assets"),
#[cfg(feature = "lessopen")]
use_lessopen: !self.matches.get_flag("no-lessopen"),
})
}
+14 -1
View File
@@ -497,7 +497,20 @@ pub fn build_app(interactive_output: bool) -> Command {
.action(ArgAction::SetTrue)
.hide(true)
.help("Do not load custom assets"),
);
#[cfg(feature = "lessopen")]
{
app = app.arg(
Arg::new("no-lessopen")
.long("no-lessopen")
.action(ArgAction::SetTrue)
.hide(true)
.help("Do not use the $LESSOPEN preprocessor"),
)
}
app = app
.arg(
Arg::new("config-file")
.long("config-file")
@@ -536,7 +549,7 @@ pub fn build_app(interactive_output: bool) -> Command {
.alias("diagnostics")
.action(ArgAction::SetTrue)
.hide_short_help(true)
.help("Show diagnostic information for bug reports.")
.help("Show diagnostic information for bug reports."),
)
.arg(
Arg::new("acknowledgements")