diff --git a/CHANGELOG.md b/CHANGELOG.md index 63d70e2e..bb40606b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ## Bugfixes - `--help` now correctly honors `--pager=builtin`. See #3516 (@keith-hall) +- `--help` now correctly honors custom themes. See #3524 (@keith-hall) ## Other diff --git a/src/bin/bat/app.rs b/src/bin/bat/app.rs index da1f0166..2df38f27 100644 --- a/src/bin/bat/app.rs +++ b/src/bin/bat/app.rs @@ -112,6 +112,7 @@ impl App { let pager = matches.get_one::("pager").map(|s| s.as_str()); let theme_options = Self::theme_options_from_matches(&matches); + let use_custom_assets = !matches.get_flag("no-custom-assets"); Self::display_help( interactive_output, @@ -120,6 +121,7 @@ impl App { use_color, pager, theme_options, + use_custom_assets, )?; std::process::exit(0); } @@ -138,6 +140,7 @@ impl App { use_color: bool, pager: Option<&str>, theme_options: ThemeOptions, + use_custom_assets: bool, ) -> Result<()> { use crate::assets::assets_from_cache_or_binary; use crate::directories::PROJECT_DIRS; @@ -176,7 +179,7 @@ impl App { }; let cache_dir = PROJECT_DIRS.cache_dir(); - let assets = assets_from_cache_or_binary(false, cache_dir)?; + let assets = assets_from_cache_or_binary(use_custom_assets, cache_dir)?; Controller::new(&help_config, &assets) .run(inputs, None) .ok();