Move config.rs into src/bin/bat/

This commit is contained in:
Fahmi Akbar Wildana 2019-10-06 08:44:14 +07:00 committed by David Peter
parent d3243903c0
commit a2ee753b25
4 changed files with 7 additions and 6 deletions

View File

@ -4,7 +4,10 @@ use std::str::FromStr;
use atty::{self, Stream};
use crate::clap_app;
use crate::{
clap_app,
config::{get_args_from_config_file, get_args_from_env_var},
};
use clap::ArgMatches;
use wild;
@ -15,7 +18,6 @@ use ansi_term;
use bat::{
assets::BAT_THEME_DEFAULT,
config::{get_args_from_config_file, get_args_from_env_var},
errors::*,
inputfile::InputFile,
line_range::{LineRange, LineRanges},

View File

@ -5,8 +5,7 @@ use std::path::PathBuf;
use shell_words;
use crate::dirs::PROJECT_DIRS;
use crate::util::transpose;
use bat::{dirs::PROJECT_DIRS, util::transpose};
pub fn config_file() -> PathBuf {
env::var("BAT_CONFIG_PATH")

View File

@ -6,6 +6,7 @@ extern crate clap;
mod app;
mod clap_app;
mod config;
mod controller;
mod decorations;
mod output;
@ -22,12 +23,12 @@ use ansi_term::Style;
use crate::{
app::{App, Config},
config::config_file,
controller::Controller,
};
use bat::{
assets::{cache_dir, clear_assets, config_dir, HighlightingAssets},
config::config_file,
errors::*,
inputfile::InputFile,
style::{OutputComponent, OutputComponents},

View File

@ -19,7 +19,6 @@ extern crate syntect;
extern crate wild;
pub mod assets;
pub mod config;
pub mod diff;
pub mod dirs;
pub mod inputfile;