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:
@@ -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
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user