mirror of
https://github.com/sharkdp/bat
synced 2026-08-07 19:31:42 +00:00
Support a hidden arg --no-custom-assets that skips loading assets from the cache
This commit is contained in:
+3
-3
@@ -80,7 +80,7 @@ fn get_syntax_mapping_to_paths<'a>(
|
||||
pub fn get_languages(config: &Config) -> Result<String> {
|
||||
let mut result: String = String::new();
|
||||
|
||||
let assets = assets_from_cache_or_binary()?;
|
||||
let assets = assets_from_cache_or_binary(config.use_custom_assets)?;
|
||||
let mut languages = assets
|
||||
.get_syntaxes()?
|
||||
.iter()
|
||||
@@ -178,7 +178,7 @@ fn theme_preview_file<'a>() -> Input<'a> {
|
||||
}
|
||||
|
||||
pub fn list_themes(cfg: &Config) -> Result<()> {
|
||||
let assets = assets_from_cache_or_binary()?;
|
||||
let assets = assets_from_cache_or_binary(cfg.use_custom_assets)?;
|
||||
let mut config = cfg.clone();
|
||||
let mut style = HashSet::new();
|
||||
style.insert(StyleComponent::Plain);
|
||||
@@ -219,7 +219,7 @@ pub fn list_themes(cfg: &Config) -> Result<()> {
|
||||
}
|
||||
|
||||
fn run_controller(inputs: Vec<Input>, config: &Config) -> Result<bool> {
|
||||
let assets = assets_from_cache_or_binary()?;
|
||||
let assets = assets_from_cache_or_binary(config.use_custom_assets)?;
|
||||
let controller = Controller::new(&config, &assets);
|
||||
controller.run(inputs)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user