Skip to content

Instantly share code, notes, and snippets.

@ebaynaud
Forked from natelandau/.bash_profile
Last active October 11, 2019 15:11
Show Gist options
  • Save ebaynaud/3cbe142601167bfb1569c4aa0b690d29 to your computer and use it in GitHub Desktop.
Save ebaynaud/3cbe142601167bfb1569c4aa0b690d29 to your computer and use it in GitHub Desktop.
Mac OSX Bash Profile
# React-Native default editor
export REACT_EDITOR=wstorm
# Path misc
export PATH=/usr/local/opt/node@10/bin:$PATH
#export PATH=/usr/local/opt/node@8/bin:$PATH
#export PATH=/usr/local/opt/node@6/bin:$PATH
export PATH=/usr/local/sbin:$PATH
export PATH=/Users/ebaynaud/.config/yarn/global/node_modules/.bin:$PATH
export PATH=/Users/ebaynaud/.yarn/bin:$PATH
export PATH=/Users/ebaynaud/Library/Python/3.7/bin:$PATH
# Node environment
export NODE_ENV=development
# Colors
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
# Prompt
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\n\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ "
# Aliases
alias ll='ls -al'
alias tree='tree -C -I "node_modules"'
alias sails='./node_modules/sails/bin/sails.js'
# Android dev
export JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/
export ANT_HOME=/usr/local/opt/ant
export MAVEN_HOME=/usr/local/opt/maven
export GRADLE_HOME=/usr/local/opt/gradle
export ANDROID_HOME=/usr/local/share/android-sdk
export ANDROID_NDK_HOME=/usr/local/share/android-ndk
export PATH=$ANT_HOME/bin:$MAVEN_HOME/bin:$GRADLE_HOME/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_HOME/build-tools/19.1.0:$PATH
# Bash completion (https://github.com/bobthecow/git-flow-completion/wiki/Install-Bash-git-completion)
if [ -f /usr/local/etc/bash_completion ]; then
. /usr/local/etc/bash_completion
fi
# Better history (http://superuser.com/questions/308919/read-all-of-the-terminal-command-history-in-os-x)
export HISTCONTROL=ignoredups:erasedups #<-- auto-erases duplicates in your history
export HISTSIZE=1000 #<-- assigns # of results to return
export HISTFILESIZE=100000 #<-- assigns # of results to store in your .bash_history
shopt -s histappend #<-- appends & saves history throughout all tabs
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND" #<--appends history from all tabs, clears & uses appended history file as current
export HISTTIMEFORMAT="%d/%m/%y %T "
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment