mirror of
https://github.com/sharkdp/bat
synced 2024-11-27 06:10:20 +00:00
make bat -L use plain style
This commit is contained in:
parent
cffacad306
commit
bf96e6e642
1 changed files with 8 additions and 3 deletions
|
@ -36,6 +36,7 @@ use bat::{
|
|||
input::Input,
|
||||
style::{StyleComponent, StyleComponents},
|
||||
MappingTarget,
|
||||
PagingMode,
|
||||
};
|
||||
|
||||
const THEME_PREVIEW_DATA: &[u8] = include_bytes!("../../../assets/theme_preview.rs");
|
||||
|
@ -248,9 +249,13 @@ fn run() -> Result<bool> {
|
|||
|
||||
if app.matches.is_present("list-languages") {
|
||||
let languages: String = get_languages(&config)?;
|
||||
let inputs: Vec<Input> = vec!(Input::from_reader(Box::new(languages.as_bytes())));
|
||||
let config = app.config(&inputs)?;
|
||||
run_controller(inputs, &config)
|
||||
let inputs: Vec<Input> = vec![Input::from_reader(Box::new(languages.as_bytes()))];
|
||||
let plain_config = Config {
|
||||
style_components: StyleComponents::new(StyleComponent::Plain.components(false)),
|
||||
paging_mode: PagingMode::QuitIfOneScreen,
|
||||
..Default::default()
|
||||
};
|
||||
run_controller(inputs, &plain_config)
|
||||
} else if app.matches.is_present("list-themes") {
|
||||
list_themes(&config)?;
|
||||
Ok(true)
|
||||
|
|
Loading…
Reference in a new issue