Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I couldn't figure out why my local changes to the theme colors definition were not being picked up, so I went to the source.
Turned out my yaml file was using some improper fields.
This PR does:
color.theme
was set to custom and nocolors.yaml
(orcolors.yml
) was foundContrary to before, if a color file definition exists and it cannot be parsed we immediately switch to the default (plus a warning). The previous logic was hiding format errors if there were other file extensions to try.
Some examples of the output (before regular lsd output):
if color.y(a)ml is found, but contains wrong data
if color.theme is set to "custom" in the config file, but no color.y(a)ml is present
Sidenotes:
cargo test
.This was already happening withWarning: the 'themes' directory is deprecated, use 'colors.yaml' instead.
,I made it slightly worse. Perhaps in general warnings should be behind#[cfg(not(test))]
or similar, didn't investigate inprint_error
either, considered it out of scope.TODO
cargo fmt