From bc0d7fa6ab15e16a5200f95f414b30e24aa9b1a6 Mon Sep 17 00:00:00 2001 From: Brennan Lujan <7959971+blujan@users.noreply.github.com> Date: Wed, 5 Aug 2026 04:05:18 -0700 Subject: [PATCH] feat(eza): add smart-group option (#13857) --- plugins/eza/README.md | 3 ++- plugins/eza/eza.plugin.zsh | 12 +++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/plugins/eza/README.md b/plugins/eza/README.md index bec1f85cb..5c2f590e0 100644 --- a/plugins/eza/README.md +++ b/plugins/eza/README.md @@ -48,10 +48,11 @@ Default: `no` ### `show-group` ```zsh -zstyle ':omz:plugins:eza' 'show-group' yes|no +zstyle ':omz:plugins:eza' 'show-group' yes|no|smart ``` If `yes` (default), always add `-g` flag to show the group ownership. +If `smart`, adds the `--smart-group` flag to only show the group if it has a different name from the owner. Default: `yes` diff --git a/plugins/eza/eza.plugin.zsh b/plugins/eza/eza.plugin.zsh index 60ed1eb27..1ee86018d 100644 --- a/plugins/eza/eza.plugin.zsh +++ b/plugins/eza/eza.plugin.zsh @@ -9,9 +9,15 @@ typeset -a _EZA_TAIL function _configure_eza() { local _val # Get the head flags - if zstyle -T ':omz:plugins:eza' 'show-group'; then - _EZA_HEAD+=("g") - fi + zstyle -s ':omz:plugins:eza' 'show-group' _val + case "${_val:l}" in + yes) + _EZA_HEAD+=("g") + ;; + smart) + _EZA_TAIL+=("--smart-group") + ;; + esac if zstyle -t ':omz:plugins:eza' 'header'; then _EZA_HEAD+=("h") fi