Skip to content

has'…' error #194

Answered by ss-o
xenoterracide asked this question in Q&A
Feb 24, 2022 · 0 comments · 4 replies
Discussion options

You must be logged in to vote

It seems that zsh: command not found: brew is printed by atload''.

Solution:

call if exists cmd brew

zi wait has"brew" atload"source $($commands[brew] --prefix asdf)/asdf.sh" for z-shell/null

or (safer)

zi wait has"brew" atload"(( $+commands[brew] )) && source $(brew --prefix asdf)/asdf.sh" for z-shell/null

and probably (only if true: has'brew' and true: file exists)

zi wait has"brew" atload"[[ -f $(brew --prefix asdf)/asdf.sh ]] && source $(brew --prefix asdf)/asdf.sh" for z-shell/null

alternate syntax for above:

zi wait has"brew" atload"[[ ! -f $(brew --prefix asdf)/asdf.sh ]] || source $(brew --prefix asdf)/asdf.sh" for z-shell/null

Replies: 0 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@xenoterracide
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by ss-o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
Q&A ✍️ Questions and answers.
2 participants