macos – Tips on how to set customized colorizing of “ls” output in Zsh?

Again when dinosaurs roamed the earth and macOS used bash, I had the next strains in my .bash_profile:

# Set LS_COLORS
LS_COLORS='di=00;34:fi=00;0:ln=00;96:pi=00;37:so=00;37:bd=00;37:cd=00;37:or=00;93:mi=00;94:ex=00;31:*.tar=00;90:*.tgz=00;90:*.gz=00;90:*.awk=00;35:*.sed=00;33'
export LS_COLORS

# Prettify and streamline listings
alias ls="ls --color=auto"
alias ll="ls -l"
alias la="ls -a"
alias lla="ls -al"
alias lF='ls -F'
alias laF='ls -laF'
alias llF='ls -lF'
alias llaF='ls -alF'

That gave me the colorized output I wished with the customized colours I wished.

I’ve been making an attempt with out success to get the identical look in Zsh.

That is what I’ve in my .zprofile:

# Set LS_COLORS
LS_COLORS='di=00;34:fi=00;0:ln=00;96:pi=00;37:so=00;37:bd=00;37:cd=00;37:or=00;93:mi=00;94:ex=00;31:*.tar=00;90:*.gz=00;90:*.awk=00;35:*.sed=00;33:*.py=00;93'
export CLICOLOR=1

# Prettify and streamline listings
alias ls="ls -G"
alias ll="ls -lG"
alias la="ls -aG"
alias lla="ls -alG"
alias lf="ls -FG"
alias laf="ls -laFG"
alias llf="ls -lFG"
alias llaf="ls -alFG"

Nevertheless, this isn’t working.

Directories do present up listed in purple, however particular person .awk, .sed or .py information don’t present up in something besides the default coloration. I’ve tried altering the atmosphere variable LS_COLORS to be LSCOLORS as I learn that macOS makes use of that title.

It didn’t assist.

I’ve additionally checked out numerous web sites ensuing from a DuckDuckGo search however all of them are both old-fashioned (referring to bash) or particular to GNU or some explicit Linux taste similar to Ubuntu. The Mac-specific websites I checked out all seem to say that setting LSCOLOR or LS_COLORS and having the road export CLICOLOR=1 in my .zprofile will work.

What am I doing mistaken?

Muhib
Muhib
Muhib is a technology journalist and the driving force behind Express Pakistan. Specializing in Telecom and Robotics. Bridges the gap between complex global innovations and local Pakistani perspectives.

Related Articles

Stay Connected

1,857,087FansLike
121,201FollowersFollow
6FollowersFollow
1FollowersFollow
- Advertisement -spot_img

Latest Articles