Repository navigation
nu_style: support fixed color lookups - #18325
Conversation
|
Shouldn't it be looking up nushell/crates/nu-utils/src/utils.rs Lines 154 to 491 in 53b805c |
I think it is? There's no special case for The fact that there are any colors at all is a result of this PR (pretty much all of the builtin LS_COLORS fallback were If you want, we could probably omit the empty records for clarity? |
Also make color_to_string return String instead of Option, and add some tests to validate the conversion from Style->NuStyle->Value
|
Thanks! |


Description
Follow-up to #17941 to make color lookups more complete. Notably, file and directory completions from
commandline complete -dnow include the sameLS_COLORSvalues used by default.For example:
User-facing changes (Release notes)
Improve
LS_COLORSsupport tocommandline complete --detailed.Additional notes
As my comment alludes to, it would be nice to have a single source of truth for all these color lookups between
nu-color-configand theansicommands. My attempts to write a macro that can be used by all three à la X macros were not very successful, but maybe there's a simpler way?