zubescu
zubescu

Reputation: 51

after installing oh-my-zsh on mac git branch don't show, but after .oh-my-zsh it works

macos BigSur installed oh-my-zsh by sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

when I start terminal git branch don't show but after run .oh-my-zsh in shows.

How to do this automatically as earlier?

I uninstalled it, reinstalled it - nothing, the same problem

.zshrc:

export ZSH="/Users/*****/.oh-my-zsh"

ZSH_THEME="robbyrussell"

plugins=(git)

source $ZSH/oh-my-zsh.sh

Upvotes: 5

Views: 9976

Answers (2)

Josh Beauregard
Josh Beauregard

Reputation: 2749

You do not have the git-prompt plugin loaded.

You only have the git plugin loaded. Which provides nice shortcuts but no prompt info. You need to edit the plugins values array to include it.

Find plugins=(git) in your above .zshrc file and replace it with.

plugins=(
  git
  git-prompt
)

It is worth noting that changes are not immediate after you make them, you will need to resource the .zshrc file by either starting a new terminal or running source ~/.zshrc.

Upvotes: 6

Solar
Solar

Reputation: 1015

If you're like me that experienced a "command not found" on your terminal after install Oh my Zsh.

NOTE: When you installed Oh my Zsh, The oh my zsh installer make a backup of orignal ~/.zsh file (that contains all of your export data) to ~/.zshrc.pre-oh-my-zsh.

I am assuming code is your default editor. Else, you can use nano

  1. Run code ~/.zshrc.pre-oh-my-zsh to open your backedup zshrc file.
  2. Copy all exports on this file ~/.zshrc.pre-oh-my-zsh and exit
  3. Paste the copied data into the new ~/.zhrc file just after the # User configuration line. (See ~/.zhrc file sample)
  4. Close and reopen your terminal and all paths will be ok

Upvotes: 1

Related Questions