I tried installing hombrew for mac os and faced some issues while adding to path, now terminal welcomes me with this messages, how can I fix it?
.zprofile:export:4: not valid in this context: export HOMEBREW_PREFIX
.zshrc:export:1: not valid in this context: Support/JetBrains/Toolbox/scripts
.zprofile :
# Added by Toolbox App
export PATH="$PATH:/Users/randus/Library/Application Support/JetBrains/Toolbox/scripts"eval "$(/opt/homebrew/bin/brew shellenv)"
eval "$(/opt/homebrew/bin/brew shellenv)"
.zshrc :
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/randus/Library/Application Support/JetBrains/Toolbox/scripts
.zprofileand.zshrcto your question. – Marlon Richert Sep 02 '22 at 16:51homebrewandMacPortsfor several years - is this:MacPortsis a far better choice for a macos package manager thanhomebrew. But don't take my word for it - research this yourself. – Seamus Sep 02 '22 at 16:59~/.zprofilecontained:export 'export HOMEBREW_PREFIX'and~/.zshrccontainedexport Support/JetBrains/Toolbox/scripts– Stéphane Chazelas Sep 02 '22 at 17:50exportas dual keyword/builtins like ksh does. Soexport var=$(cmd)no longer subjects the command substitution to word splitting.not valid in this context: export HOMEBREW_PREFIXis evidence that the space betweenexportandHOMEBREW_PREFIXdidn't trigger splitting. – Stéphane Chazelas Sep 02 '22 at 17:52export var=$(cmd)is no longer a list context asvar=$(cmd)is interpreted as assignment – Stéphane Chazelas Sep 05 '22 at 07:49