diff --git a/.zshrc b/.zshrc index fd5a8c6..ac09f76 100644 --- a/.zshrc +++ b/.zshrc @@ -113,9 +113,15 @@ bindkey -v [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh # make brew accessible -if [ -d "$HOME/linuxbrew/.linuxbrew" ] ; then - eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" -fi +# OLD VERSION: +# if [ -d "$HOME/linuxbrew/.linuxbrew" ] ; then +# eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" +# fi +# NEW VERSION: +test -d ~/.linuxbrew && eval "$(~/.linuxbrew/bin/brew shellenv)" +test -d /home/linuxbrew/.linuxbrew && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" +test -r ~/.bash_profile && echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.bash_profile +echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.profile # set PATH so it includes user's private ~/.local/bin if it exists # lvim is installed to this directory (at least on ubuntu) diff --git a/makefile b/makefile index 6af7240..ad73f15 100644 --- a/makefile +++ b/makefile @@ -21,6 +21,12 @@ setup_git: git config --global pull.rebase false setup_fzf: + # brew install fzf + # NEXT LINES ALSO IN .ZSHRC + # test -d ~/.linuxbrew && eval "$(~/.linuxbrew/bin/brew shellenv)" + # test -d /home/linuxbrew/.linuxbrew && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" + # test -r ~/.bash_profile && echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.bash_profile + # echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.profile echo "make sure /home/linuxbrew/.linuxbrew/opt/fzf/bin exists" echo "make sure /home/linuxbrew/.linuxbrew/opt/fzf/shell/completion.zsh exists" echo "make sure /home/linuxbrew/.linuxbrew/opt/fzf/shell/key-bindings.zsh exists"