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

[bug]: Fallback command for ZINIT[LIST_COMMAND] is invalid #544

Open
1 task done
yyykt opened this issue Jul 9, 2023 · 0 comments
Open
1 task done

[bug]: Fallback command for ZINIT[LIST_COMMAND] is invalid #544

yyykt opened this issue Jul 9, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@yyykt
Copy link
Contributor

yyykt commented Jul 9, 2023

What happened?

zinit snippets does not work with following error.

> zinit snippets
No `tree' program, it is required by the subcommand `ls'
Download from: http://mama.indstate.edu/users/ice/tree/
It is also available probably in all distributions and Homebrew, as package `tree'
ls: unrecognized option '--tree'
Try 'ls --help' for more information.
, located at ZINIT[SNIPPETS_DIR], i.e. /home/yu/.local/share/zinit/snippets

Steps to reproduce

run zinit snipptes in a environment where exa nor tree available.

Relevant output

No response

Screenshots and recordings

No response

Operating System & Version

arch linux

Zsh version

zsh 5.9 (x86_64-pc-linux-gnu)

Terminal emulator

alacritty

If using WSL on Windows, which version of WSL

None

Additional context

It appears that 'ls --tree' is being used as a fallback command for ZINIT[LIST_COMMAND] when neither the 'exa' nor 'tree' command is available. However, this option is invalid and does not function as a fallback.

zinit/zinit.zsh

Lines 65 to 73 in 1cb1df6

if [[ -z ${ZINIT[LIST_COMMAND]} ]]; then
if (( ${+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
ZINIT[LIST_COMMAND]='ls --tree'
fi
fi

Code of Conduct

  • I agree to follow this project's Code of Conduct
@yyykt yyykt added the bug Something isn't working label Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants