mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-08-07 06:08:39 +02:00
feat(eza): add smart-group option (#13857)
This commit is contained in:
parent
ed19f8ffcf
commit
bc0d7fa6ab
2 changed files with 11 additions and 4 deletions
|
|
@ -48,10 +48,11 @@ Default: `no`
|
||||||
### `show-group`
|
### `show-group`
|
||||||
|
|
||||||
```zsh
|
```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 `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`
|
Default: `yes`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,15 @@ typeset -a _EZA_TAIL
|
||||||
function _configure_eza() {
|
function _configure_eza() {
|
||||||
local _val
|
local _val
|
||||||
# Get the head flags
|
# Get the head flags
|
||||||
if zstyle -T ':omz:plugins:eza' 'show-group'; then
|
zstyle -s ':omz:plugins:eza' 'show-group' _val
|
||||||
|
case "${_val:l}" in
|
||||||
|
yes)
|
||||||
_EZA_HEAD+=("g")
|
_EZA_HEAD+=("g")
|
||||||
fi
|
;;
|
||||||
|
smart)
|
||||||
|
_EZA_TAIL+=("--smart-group")
|
||||||
|
;;
|
||||||
|
esac
|
||||||
if zstyle -t ':omz:plugins:eza' 'header'; then
|
if zstyle -t ':omz:plugins:eza' 'header'; then
|
||||||
_EZA_HEAD+=("h")
|
_EZA_HEAD+=("h")
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue