Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

brew installation for zsh?

Tags:

homebrew

zsh

Hi I just followed the thoughtbot laptop setup for my Mac Mini Server running OSX Lion Server. I'm not sure that everything is installed correctly. Please advise.

I don't have a ~/.bash_profile or ~/.bashrc but i do have a ~/.profile

But here are contents for .zshrc since I use .zsh.

   1 # load our own completion functions    2 fpath=(~/.zsh/completion $fpath)    3     4 # completion    5 autoload -U compinit    6 compinit    7     8 # automatically enter directories without cd    9 setopt auto_cd   10    11 # use vim as an editor   12 export EDITOR=vim   13    14 # aliases   15 if [ -e "$HOME/.aliases" ]; then   16   source "$HOME/.aliases"   17 fi   18    19 # vi mode   20 bindkey -v   21 bindkey "^F" vi-cmd-mode   22 bindkey jj vi-cmd-mode   23    24 # use incremental search   25 bindkey "^R" history-incremental-search-backward   26    27 # add some readline keys back   28 bindkey "^A" beginning-of-line   29 bindkey "^E" end-of-line   30    31 # handy keybindings   32 bindkey "^P" history-search-backward   33 bindkey "^Y" accept-and-hold   34 bindkey "^N" insert-last-word   35 bindkey -s "^T" "^[Isudo ^[A" # "t" for "toughguy"   36    37 # expand functions in the prompt   38 setopt prompt_subst   39    40 # prompt   41 export PS1='[${SSH_CONNECTION+"%n@%m:"}%~] '   42    43 # ignore duplicate history entries   44 setopt histignoredups   45    46 # keep TONS of history   47 export HISTSIZE=4096   48    49 # look for ey config in project dirs   50 export EYRC=./.eyrc   51    52 # automatically pushd   53 setopt auto_pushd   54 export dirstacksize=5   55    56 # awesome cd movements from zshkit   57 setopt AUTOCD   58 setopt AUTOPUSHD PUSHDMINUS PUSHDSILENT PUSHDTOHOME   59 setopt cdablevars   60    61 # Try to correct command line spelling   62 setopt CORRECT CORRECT_ALL   63    64 # Enable extended globbing   65 setopt EXTENDED_GLOB   66    67 # RVM   68 [[ -s '/Users/pma/.rvm/scripts/rvm' ]] && source '/Users/pma/.rvm/scripts/rvm' 

Brew complains with brew doctor

[~] brew doctor /usr/bin is in your PATH before Homebrew's bin. This means that system- provided programs will be used before Homebrew-provided ones. This is an issue if you install, for instance, Python.  Consider editing your .bashrc to put:   /usr/local/bin ahead of /usr/bin in your $PATH. 

zsh:

[~] zsh --version zsh --version zsh 4.3.11 (i386-apple-darwin11.0) 

So how can I ensure brew is installed correctly and remove the errors from brew doctor?

like image 931
Patrick Ma Avatar asked Aug 19 '11 05:08

Patrick Ma


People also ask

Does Brew work with zsh?

To use the zsh that brew installed, use dscl . After that, restart your Terminal to have it take effect. You can also use System Preferences.

How do I enable zsh on my Mac?

Hold the Ctrl key, click your user account's name in the left pane, and select “Advanced Options.” Click the “Login Shell” dropdown box and select “/bin/bash” to use Bash as your default shell or “/bin/zsh” to use Zsh as your default shell. Click “OK” to save your changes.


1 Answers

Try setting this line in your .zshrc

export PATH=/usr/local/bin:$PATH 
like image 50
Devin M Avatar answered Oct 05 '22 23:10

Devin M