浏览代码

feat(eza): add icons option (#12469)

Co-authored-by: Computer <computer@MAI.local>
EraPartner 10 月之前
父节点
当前提交
228d44d55d
共有 2 个文件被更改,包括 13 次插入0 次删除
  1. 10 0
      plugins/eza/README.md
  2. 3 0
      plugins/eza/eza.plugin.zsh

+ 10 - 0
plugins/eza/README.md

@@ -55,6 +55,16 @@ If `yes` (default), always add `-g` flag to show the group ownership.
 
 Default: `yes`
 
+### `icons`
+
+```zsh
+zstyle ':omz:plugins:eza' 'icons' yes|no
+```
+
+If `yes`, sets the `--icons` option of `eza`, adding icons for files and folders.
+
+Default: `no`
+
 ### `size-prefix`
 
 ```zsh

+ 3 - 0
plugins/eza/eza.plugin.zsh

@@ -31,6 +31,9 @@ function _configure_eza() {
   if zstyle -t ':omz:plugins:eza' 'git-status'; then
     _EZA_TAIL+=("--git")
   fi
+  if zstyle -t ':omz:plugins:eza' 'icons'; then
+    _EZA_TAIL+=("--icons")
+  fi
   zstyle -s ':omz:plugins:eza' 'time-style' _val
   if [[ $_val ]]; then
     _EZA_TAIL+=("--time-style='$_val'")