lsd-rs / lsd

The next gen ls command
Apache License 2.0
13.16k stars 429 forks source link

[Bug]: user/group/filesize colors not changing with LS_COLORS #877

Closed kassio closed 12 months ago

kassio commented 1 year ago

Version

version

lsd 0.23.1

What OS are you seeing the problem on?

macOS

installation

brew

term

$ echo $TERM wezterm

ls-colors

No response

What happened?

It seems like user/group/filesize colors not changing with LS_COLORS
image

What expected?

user/group/filesize to match colors of LS_COLORS

What else?

No response

davekch commented 1 year ago

same on Ubuntu using colors.yaml. The colors do not change.

zwpaper commented 1 year ago

Hi @kassio @davekch please update to the v1.0.0 and try the colors.yaml.

if there is any problem, feel free to update it here.

davekch commented 1 year ago

forgot to mention, I am already using v1.0.0

I found out what my issue was: a nonexistent color somewhere in colors.yaml. Interestingly, if any color is invalid, all other color settings also don't take effect. I could not change the color of user and group, because the color of something else was invalid. Not sure whether that's a bug or intended. Maybe printing a warning would be helpful in such cases.

zwpaper commented 1 year ago

hi @davekch thanks for reporting, could you please post your invalid theme here?

I would find out where is the problem and may be do some improvement.

davekch commented 1 year ago

unfortunately I deleted my original faulty theme. To reproduce the behavior you can use this theme (just switch permission.read to something valid for the entire theme to take effect):

user: dark_blue
group: dark_blue
permission:
  read: invalid
  write: dark_yellow
  exec: dark_red
  exec-sticky: 5
  no-access: 245
  octal: 6
  acl: dark_cyan
  context: cyan
date:
  hour-old: 40
  day-old: 42
  older: 36
size:
  none: 245
  small: 116
  medium: 104
  large: 92
inode:
  valid: 13
  invalid: 245
links:
  valid: 13
  invalid: 245
tree-edge: 245
git-status:
  default: 245
  unmodified: 245
  ignored: 245
  new-in-index: dark_green
  new-in-workdir: dark_green
  typechange: dark_yellow
  deleted: dark_red
  renamed: dark_green
  modified: dark_yellow
  conflicted: dark_red
kassio commented 12 months ago

This worked for me. Thanks