Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: check for eza to use in $ZINIT[LIST_COMMAND] option #636

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions zinit.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ fi
if [[ -z ${ZINIT[LIST_COMMAND]} ]]; then
if (( ${+commands[exa]} )); then
ZINIT[LIST_COMMAND]='exa --color=always --tree --icons -L3'
elif (( ${+commands[eza]} )); then
ZINIT[LIST_COMMAND]='eza --color=always --tree --icons -L3'
Comment on lines 66 to +69
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe check for eza before exa? If both are installed on the system, we'd probably want to prefer the non-deprecated one.

Suggested change
if (( ${+commands[exa]} )); then
ZINIT[LIST_COMMAND]='exa --color=always --tree --icons -L3'
elif (( ${+commands[eza]} )); then
ZINIT[LIST_COMMAND]='eza --color=always --tree --icons -L3'
if (( ${+commands[eza]} )); then
ZINIT[LIST_COMMAND]='eza --color=always --tree --icons -L3'
elif (( ${+commands[exa]} )); then
ZINIT[LIST_COMMAND]='exa --color=always --tree --icons -L3'

elif (( ${+commands[tree]} )); then
ZINIT[LIST_COMMAND]='tree -L 3 -C --charset utf-8'
else
Expand Down
Loading