diff --git a/crates/nu-explore/src/nu_common/lscolor.rs b/crates/nu-explore/src/nu_common/lscolor.rs index 31a5571ef5..491d2c3f3a 100644 --- a/crates/nu-explore/src/nu_common/lscolor.rs +++ b/crates/nu-explore/src/nu_common/lscolor.rs @@ -4,7 +4,6 @@ use nu_ansi_term::{Color, Style}; use nu_engine::env_to_string; use nu_protocol::engine::{EngineState, Stack}; use nu_utils::get_ls_colors; -use std::fs::symlink_metadata; pub fn create_lscolors(engine_state: &EngineState, stack: &Stack) -> LsColors { let colors = stack @@ -14,6 +13,7 @@ pub fn create_lscolors(engine_state: &EngineState, stack: &Stack) -> LsColors { get_ls_colors(colors) } +/// Colorizes any columns named "name" in the table using LS_COLORS pub fn lscolorize(header: &[String], data: &mut [Vec], lscolors: &LsColors) { for (col, col_name) in header.iter().enumerate() { if col_name != "name" { @@ -33,14 +33,7 @@ pub fn lscolorize(header: &[String], data: &mut [Vec], lscolors: &LsColo fn get_path_style(path: &str, ls_colors: &LsColors) -> Option