summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Just <nicojust@users.noreply.github.com>2025-01-15 12:40:52 +0100
committerGitHub <noreply@github.com>2025-01-15 12:40:52 +0100
commit04cba220f7bd7b27483a5b346e2ca717f0341895 (patch)
tree67bb427ecd9af7833ff253be0aa64f7405afe588
parent7a3695aadf51aaa24e79175b1684d4836e31956d (diff)
downloadzsh-04cba220f7bd7b27483a5b346e2ca717f0341895.tar.gz
zsh-04cba220f7bd7b27483a5b346e2ca717f0341895.tar.bz2
zsh-04cba220f7bd7b27483a5b346e2ca717f0341895.zip
feat(eza): add color-scale options (#12841)
-rw-r--r--plugins/eza/README.md23
-rw-r--r--plugins/eza/eza.plugin.zsh8
2 files changed, 31 insertions, 0 deletions
diff --git a/plugins/eza/README.md b/plugins/eza/README.md
index 90e549994..bec1f85cb 100644
--- a/plugins/eza/README.md
+++ b/plugins/eza/README.md
@@ -65,6 +65,29 @@ If `yes`, sets the `--icons` option of `eza`, adding icons for files and folders
Default: `no`
+### `color-scale`
+
+```zsh
+zstyle ':omz:plugins:eza' 'color-scale' all|age|size
+```
+
+Highlight levels of field(s) distinctly. Use comma(,) separated list of `all`, `age`, `size`
+
+Default: `none`
+
+### `color-scale-mode`
+
+```zsh
+zstyle ':omz:plugins:eza' 'color-scale-mode' gradient|fixed
+```
+
+Choose the mode for highlighting:
+
+- `gradient` (default) -- gradient coloring
+- `fixed` -- fixed coloring
+
+Default: `gradient`
+
### `size-prefix`
```zsh
diff --git a/plugins/eza/eza.plugin.zsh b/plugins/eza/eza.plugin.zsh
index f25f1c30b..60ed1eb27 100644
--- a/plugins/eza/eza.plugin.zsh
+++ b/plugins/eza/eza.plugin.zsh
@@ -34,6 +34,14 @@ function _configure_eza() {
if zstyle -t ':omz:plugins:eza' 'icons'; then
_EZA_TAIL+=("--icons=auto")
fi
+ zstyle -s ':omz:plugins:eza' 'color-scale' _val
+ if [[ $_val ]]; then
+ _EZA_TAIL+=("--color-scale=$_val")
+ fi
+ zstyle -s ':omz:plugins:eza' 'color-scale-mode' _val
+ if [[ $_val == (gradient|fixed) ]]; then
+ _EZA_TAIL+=("--color-scale-mode=$_val")
+ fi
zstyle -s ':omz:plugins:eza' 'time-style' _val
if [[ $_val ]]; then
_EZA_TAIL+=("--time-style='$_val'")