zdharma-continuum / zinit-packages

zinit package repository
https://zdharma-continuum.github.io/zinit/wiki/Zinit-Packages/
21 stars 3 forks source link

[bug]: ls_colors config does not work #9

Open albertfgu opened 1 year ago

albertfgu commented 1 year ago

Describe the bug

I copied the zinit command for ls_colors

zinit \
    atclone'[[ -z ${commands[dircolors]} ]] &&
      local P=${${(M)OSTYPE##darwin}:+g};
      ${P}sed -i '\''/DIR/c\DIR 38;5;63;1'\'' LS_COLORS;
      ${P}dircolors -b LS_COLORS >! clrs.zsh' \
    atload'zstyle '\'':completion:*:default'\'' list-colors "${(s.:.)LS_COLORS}";' \
    atpull'%atclone' \
    git \
    id-as'trapd00r/LS_COLORS' \
    lucid \
    nocompile'!' \
    pick'clrs.zsh' \
    reset \
  for @trapd00r/LS_COLORS

It gives the following error

Downloading trapd00r/LS_COLORS…
Cloning into '/Users/albertgu/.local/share/zinit/plugins/trapd00r---LS_COLORS'...
⠧ ███████████ OBJ: 100, PACK: 1277/1277, COMPR: 100%, REC: 100%, RES: 100%
(eval):3: command not found: gsed
(eval):4: command not found: gdircolors
Warning: ∞zinit-atclone-hook hook returned with 127
Note: Compiling: clrs.zsh… OK.

Steps to reproduce

See above

Expected behavior

.

Screenshots and recordings

No response

Operating System & Version

darwin20.0 | apple | x86_64 | x86_64 | x86_64 i386

Zsh version

zsh 5.8 (x86_64-apple-darwin20.0)

Terminal emulator

xterm-256color

If using WSL on Windows, which version of WSL

No response

Additional context

No response

HeroCC commented 11 months ago

LS_COLORS expects you to use a gnu-based ls. On MacOS, the default is bsd. Try installing the GNU coreutils w/ brew install coreutils