Skip to content

[Bug] Incorrect and Misleading README #24

@ngtv2409

Description

@ngtv2409

This issue is related to the discussion: eza #1678

I noticed the README file in this repository has a misleading instruction, specifically the section File- and Extension-Based Overrides.

The README suggests styling icons like this:

You can customize the appearance and icons for specific filenames or file extensions,
allowing for granular control over how certain files are displayed.
Filenames

To override styles for specific filenames:

filenames:
  "Makefile":
    filename:
      foreground: Red
      is_bold: true
    icon:
      glyph: ⚙️
      foreground: Red

Which is NOT correct. Because the structs relating to this theme field are defined:

#[derive(Debug, Default, PartialEq, Eq, Clone, Copy, Serialize, Deserialize)]
pub struct IconStyle {
    pub glyph: Option<char>,
    pub style: Option<Style>,
}

#[derive(Debug, Default, PartialEq, Eq, Clone, Copy, Serialize, Deserialize)]
pub struct FileNameStyle {
    pub icon: Option<IconStyle>,
    pub filename: Option<Style>,
}

And we can see that the styling of icons should be under style. So the correct way to do that is:

extensions:
  c:
    filename:
      foreground: Green
    icon:
      glyph: C
      style:
        foreground: Red

Not foreground directly under icon:. Infact: All of the instructions in the section are incorrect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions