Repository: eza-community/eza (language: rust)

Issue:
bug: root group is not highlighted for root user
Usually, if a user has a primary group, both the username and the group are highlighted. Since the last version this is no longer the case for the root user.

Normal user:
![Bildschirmfoto vom 2023-10-08 00-16-06](https://github.com/eza-community/eza/assets/30043959/82c0be92-ea2a-4498-b262-9488c9a0a853)

Root user:
![Bildschirmfoto vom 2023-10-08 00-16-15](https://github.com/eza-community/eza/assets/30043959/1e476e01-fbaf-4dc2-aa54-bc1e4c3f0229)

I suspect this is due to the `Separated root color from other users` change and that the color priority of 'group belongs to root' takes precedence over 'group belongs to current user'. But with the default config, this breaks the highlighting of the root group for the root user.

Feel free to close if this was intentional.

OS: Gentoo Linux
Eza: v0.14.0 [+git]


Discussion / hints:
Refs: #431 
@MartinFillon this is expected right?
Ah that's an interesting case, as the person who requested this feature in the first place I'm not sure what to do in this case 🤔
This is indeed a bug gonna have a look @cafkafk thanks for the heads up @bew 

Fix patch:
diff --git a/src/output/render/groups.rs b/src/output/render/groups.rs
index d8e76537e..c0654bd08 100644
--- a/src/output/render/groups.rs
+++ b/src/output/render/groups.rs
@@ -42,7 +42,7 @@ impl Render for Option<f::Group> {
             }
         }
 
-        if group.gid() == 0 {
+        if group.gid() == 0 && style != colours.yours() {
             style = colours.root_group();
         }
 


Test patch: