has'…' error #194
-
zi wait has"brew" atload"$(brew --prefix asdf)/asdf.sh" for z-shell/null
/home/xeno/.zshrc:1: command not found: brew shouldn't this not error? note: brew is not installed. |
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 4 replies
-
It seems error comes from: I will update you on this one. |
Beta Was this translation helpful? Give feedback.
-
I have tried I could check this if you provide steps to reproduce. However, it seems brew is not in PATH. I would double-check PATH or try: zi wait has"brew" atload"$(<full/path/to/>brew --prefix asdf)/asdf.sh" for z-shell/null |
Beta Was this translation helpful? Give feedback.
-
It seems that 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: 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 |
Beta Was this translation helpful? Give feedback.
It seems that
zsh: command not found: brew
is printed byatload''
.Solution:
call if exists cmd brew
or (safer)
and probably (only if true:
has'brew'
and true:file exists
)alternate syntax for above: