mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 12:25:58 +02:00
enable ls_colors for the ls
command (#340)
* enable ls_colors for the `ls` command * added wrapping with ansi-cut so the ansi sequences don't bleed over * clippy
This commit is contained in:
@ -6,6 +6,7 @@ use crate::{ShellError, Value};
|
||||
pub struct Config {
|
||||
pub filesize_metric: bool,
|
||||
pub table_mode: String,
|
||||
pub use_ls_colors: bool,
|
||||
}
|
||||
|
||||
impl Default for Config {
|
||||
@ -13,6 +14,7 @@ impl Default for Config {
|
||||
Config {
|
||||
filesize_metric: false,
|
||||
table_mode: "rounded".into(),
|
||||
use_ls_colors: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -31,6 +33,9 @@ impl Value {
|
||||
"table_mode" => {
|
||||
config.table_mode = value.as_string()?;
|
||||
}
|
||||
"use_ls_colors" => {
|
||||
config.use_ls_colors = value.as_bool()?;
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user