Skip to content

Commit 16881ba

Browse files
committed
Updates bashrc; mostly homebrew related
1 parent b2df946 commit 16881ba

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

bashrc

+16-7
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ if [ -d $HOME/Library/Python/3.7/bin ] ; then
2828
PATH="${PATH}:$HOME/Library/Python/3.7/bin"
2929
fi
3030

31+
export HOMEBREW_PREFIX="/opt/homebrew";
32+
export HOMEBREW_CELLAR="/opt/homebrew/Cellar";
33+
export HOMEBREW_REPOSITORY="/opt/homebrew";
34+
export HOMEBREW_SHELLENV_PREFIX="/opt/homebrew";
35+
export MANPATH="/opt/homebrew/share/man${MANPATH+:$MANPATH}:";
36+
export INFOPATH="/opt/homebrew/share/info:${INFOPATH:-}";
37+
3138
# rbenv
3239
if [ `which rbenv 2> /dev/null` ]; then
3340
eval "$(rbenv init -)"
@@ -39,11 +46,6 @@ fi
3946
# PATH="${PATH}:/usr/local/share/npm/bin"
4047
# fi
4148

42-
# MySql
43-
# if [ -d /usr/local/mysql/bin ] ; then
44-
# PATH="${PATH}:/usr/local/mysql/bin"
45-
# fi
46-
4749
PATH=./bin:${PATH}
4850
PATH=.:${PATH}
4951

@@ -120,7 +122,7 @@ shopt -s extglob
120122
shopt -s checkwinsize
121123

122124
export PAGER="less"
123-
export EDITOR="vim"
125+
export EDITOR="nvim"
124126

125127
############################################################
126128
## History
@@ -185,7 +187,7 @@ complete -W "$(_ssh_completion)" ssh
185187
## Other
186188
############################################################
187189

188-
source /usr/local/etc/bash_completion.d/cdargs-bash.sh
190+
source $HOMEBREW_PREFIX/etc/bash_completion.d/cdargs-bash.sh
189191

190192
if [[ "$USER" == '' ]]; then
191193
# mainly for cygwin terminals. set USER env var if not already set
@@ -288,3 +290,10 @@ function gkill () {
288290
export NVM_DIR="$HOME/.nvm"
289291
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
290292
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
293+
294+
## folder /opt/homebrew contains Homebrew for arm64 #m1_homebrew-arm64
295+
[[ $(arch) == "arm64" ]] && export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH" #m1_homebrew-arm64
296+
[[ $(arch) == "x86_64" ]] && export PATH="/usr/local/Homebrew/bin:/usr/local/Homebrew/sbin:$PATH"
297+
298+
alias ibrew='arch --x86_64 /usr/local/Homebrew/bin/brew'
299+

0 commit comments

Comments
 (0)