mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-19 04:21:06 +00:00
Move config.rs into src/bin/bat/
This commit is contained in:
parent
d3243903c0
commit
a2ee753b25
@ -4,7 +4,10 @@ use std::str::FromStr;
|
|||||||
|
|
||||||
use atty::{self, Stream};
|
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 clap::ArgMatches;
|
||||||
use wild;
|
use wild;
|
||||||
|
|
||||||
@ -15,7 +18,6 @@ use ansi_term;
|
|||||||
|
|
||||||
use bat::{
|
use bat::{
|
||||||
assets::BAT_THEME_DEFAULT,
|
assets::BAT_THEME_DEFAULT,
|
||||||
config::{get_args_from_config_file, get_args_from_env_var},
|
|
||||||
errors::*,
|
errors::*,
|
||||||
inputfile::InputFile,
|
inputfile::InputFile,
|
||||||
line_range::{LineRange, LineRanges},
|
line_range::{LineRange, LineRanges},
|
||||||
|
@ -5,8 +5,7 @@ use std::path::PathBuf;
|
|||||||
|
|
||||||
use shell_words;
|
use shell_words;
|
||||||
|
|
||||||
use crate::dirs::PROJECT_DIRS;
|
use bat::{dirs::PROJECT_DIRS, util::transpose};
|
||||||
use crate::util::transpose;
|
|
||||||
|
|
||||||
pub fn config_file() -> PathBuf {
|
pub fn config_file() -> PathBuf {
|
||||||
env::var("BAT_CONFIG_PATH")
|
env::var("BAT_CONFIG_PATH")
|
@ -6,6 +6,7 @@ extern crate clap;
|
|||||||
|
|
||||||
mod app;
|
mod app;
|
||||||
mod clap_app;
|
mod clap_app;
|
||||||
|
mod config;
|
||||||
mod controller;
|
mod controller;
|
||||||
mod decorations;
|
mod decorations;
|
||||||
mod output;
|
mod output;
|
||||||
@ -22,12 +23,12 @@ use ansi_term::Style;
|
|||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
app::{App, Config},
|
app::{App, Config},
|
||||||
|
config::config_file,
|
||||||
controller::Controller,
|
controller::Controller,
|
||||||
};
|
};
|
||||||
|
|
||||||
use bat::{
|
use bat::{
|
||||||
assets::{cache_dir, clear_assets, config_dir, HighlightingAssets},
|
assets::{cache_dir, clear_assets, config_dir, HighlightingAssets},
|
||||||
config::config_file,
|
|
||||||
errors::*,
|
errors::*,
|
||||||
inputfile::InputFile,
|
inputfile::InputFile,
|
||||||
style::{OutputComponent, OutputComponents},
|
style::{OutputComponent, OutputComponents},
|
||||||
|
@ -19,7 +19,6 @@ extern crate syntect;
|
|||||||
extern crate wild;
|
extern crate wild;
|
||||||
|
|
||||||
pub mod assets;
|
pub mod assets;
|
||||||
pub mod config;
|
|
||||||
pub mod diff;
|
pub mod diff;
|
||||||
pub mod dirs;
|
pub mod dirs;
|
||||||
pub mod inputfile;
|
pub mod inputfile;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user