mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-10 23:00:56 +00:00
Move EXA_DEBUG variable to vars file
This commit is contained in:
parent
a45bcfe058
commit
e154b58268
@ -48,12 +48,16 @@ fn main() {
|
|||||||
|
|
||||||
/// Sets up a global logger if one is asked for.
|
/// Sets up a global logger if one is asked for.
|
||||||
/// The ‘EXA_DEBUG’ environment variable controls whether log messages are
|
/// The ‘EXA_DEBUG’ environment variable controls whether log messages are
|
||||||
/// displayed or not. Currently there are just two settings (on and off)
|
/// displayed or not. Currently there are just two settings (on and off).
|
||||||
|
///
|
||||||
|
/// This can’t be done in exa’s own option parsing because that part of it
|
||||||
|
/// logs as well, so by the time execution gets there, the logger needs to
|
||||||
|
/// have already been set up.
|
||||||
pub fn configure_logger() {
|
pub fn configure_logger() {
|
||||||
extern crate env_logger;
|
extern crate env_logger;
|
||||||
extern crate log;
|
extern crate log;
|
||||||
|
|
||||||
let present = match var_os("EXA_DEBUG") {
|
let present = match var_os(exa::vars::EXA_DEBUG) {
|
||||||
Some(debug) => debug.len() > 0,
|
Some(debug) => debug.len() > 0,
|
||||||
None => false,
|
None => false,
|
||||||
};
|
};
|
||||||
|
@ -33,6 +33,7 @@ use fs::{Dir, File};
|
|||||||
use fs::feature::ignore::IgnoreCache;
|
use fs::feature::ignore::IgnoreCache;
|
||||||
use fs::feature::git::GitCache;
|
use fs::feature::git::GitCache;
|
||||||
use options::{Options, Vars};
|
use options::{Options, Vars};
|
||||||
|
pub use options::vars;
|
||||||
pub use options::Misfire;
|
pub use options::Misfire;
|
||||||
use output::{escape, lines, grid, grid_details, details, View, Mode};
|
use output::{escape, lines, grid, grid_details, details, View, Mode};
|
||||||
|
|
||||||
|
@ -24,8 +24,13 @@ pub static EXA_COLORS: &str = "EXA_COLORS";
|
|||||||
/// complaining if an argument was specified twice, or if two conflict.
|
/// complaining if an argument was specified twice, or if two conflict.
|
||||||
/// This is meant to be so you don’t accidentally introduce the wrong
|
/// This is meant to be so you don’t accidentally introduce the wrong
|
||||||
/// behaviour in a script, rather than for general command-line use.
|
/// behaviour in a script, rather than for general command-line use.
|
||||||
|
/// Any non-empty value will turn strict mode on.
|
||||||
pub static EXA_STRICT: &str = "EXA_STRICT";
|
pub static EXA_STRICT: &str = "EXA_STRICT";
|
||||||
|
|
||||||
|
/// Environment variable used to make exa print out debugging information as
|
||||||
|
/// it runs. Any non-empty value will turn debug mode on.
|
||||||
|
pub static EXA_DEBUG: &str = "EXA_DEBUG";
|
||||||
|
|
||||||
/// Environment variable used to limit the grid-details view
|
/// Environment variable used to limit the grid-details view
|
||||||
/// (`--grid --long`) so it’s only activated if there’s at least the given
|
/// (`--grid --long`) so it’s only activated if there’s at least the given
|
||||||
/// number of rows of output.
|
/// number of rows of output.
|
||||||
|
Loading…
Reference in New Issue
Block a user