mirror of
https://github.com/sharkdp/bat.git
synced 2024-11-16 04:43:36 +01:00
Changed to plain style
This commit is contained in:
parent
5444b0dfed
commit
38544ed735
@ -31,12 +31,14 @@ mod terminal;
|
|||||||
use std::io;
|
use std::io;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::process;
|
use std::process;
|
||||||
|
use std::collections::HashSet;
|
||||||
|
|
||||||
use ansi_term::Colour::Green;
|
use ansi_term::Colour::Green;
|
||||||
|
|
||||||
use app::{App, Config};
|
use app::{App, Config};
|
||||||
use assets::{clear_assets, config_dir, HighlightingAssets};
|
use assets::{clear_assets, config_dir, HighlightingAssets};
|
||||||
use controller::Controller;
|
use controller::Controller;
|
||||||
|
use style::{OutputComponent, OutputComponents};
|
||||||
|
|
||||||
mod errors {
|
mod errors {
|
||||||
error_chain! {
|
error_chain! {
|
||||||
@ -130,7 +132,10 @@ pub fn list_languages(assets: &HighlightingAssets, term_width: usize) {
|
|||||||
|
|
||||||
pub fn list_themes(assets: &HighlightingAssets, config: &mut Config) {
|
pub fn list_themes(assets: &HighlightingAssets, config: &mut Config) {
|
||||||
let themes = &assets.theme_set.themes;
|
let themes = &assets.theme_set.themes;
|
||||||
|
let mut style = HashSet::new();
|
||||||
|
style.insert(OutputComponent::Plain);
|
||||||
config.files = vec![Some("assets/hello.rs")];
|
config.files = vec![Some("assets/hello.rs")];
|
||||||
|
config.output_components = OutputComponents(style);
|
||||||
for (theme, _) in themes.iter() {
|
for (theme, _) in themes.iter() {
|
||||||
println!("{}", theme);
|
println!("{}", theme);
|
||||||
config.theme = theme.to_string();
|
config.theme = theme.to_string();
|
||||||
|
Loading…
Reference in New Issue
Block a user