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

Issue with /opt/homebrew/bin/brew and /opt/homebrew/Cellar/rbenv... in terminal #92

Open
markcyen opened this issue Mar 12, 2021 · 0 comments

Comments

@markcyen
Copy link

When I open up terminal, the following appears:
/Users/markcyen/.zprofile:1: no such file or directory: /opt/homebrew/bin/brew (eval):source:3: no such file or directory: /opt/homebrew/Cellar/rbenv/1.1.2/libexec/../completions/rbenv.zsh

To fix /Users/markcyen/.zprofile:1: no such file or directory: /opt/homebrew/bin/brew, @redferret provided some guidance. In the terminal, type in atom .zprofile to open up the .zprofile in atom. What should be in there is eval $(/usr/local/bin/brew shellenv). Copy this and paste over what is already in there.

To fix (eval):source:3: no such file or directory: /opt/homebrew/Cellar/rbenv/1.1.2/libexec/../completions/rbenv.zsh, type in atom .zshrc in the terminal. .zshrc file should have some form of this text:

export PATH="/usr/local/bin:$PATH"
# Load version control information
autoload -Uz vcs_info
precmd() { vcs_info }
# Format the vcs_info_msg_0_ variable
zstyle ':vcs_info:git:*' formats '%b'
# Determine if current working directory is a git repository
git_branch_color() {
  if current_git_status=$(git status 2> /dev/null); then
    parse_git_dirty
  else
    echo ""
  fi
}
# Change branch color if working tree is clean
parse_git_dirty() {
  if current_git_status=$(git status | grep 'Changes to be committed:\|Untracked files:\|modified:|deleted:' 2> /dev/null); then
    echo "%F{red}"
  else
    echo "%F{green}"
  fi
}
# Set up the prompt (with git branch name)
setopt PROMPT_SUBST
PROMPT='%F{white}%d $(git_branch_color)${vcs_info_msg_0_} %f$  '
# rbenv
eval "$(rbenv init -)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant