Last active
April 2, 2018 00:52
-
-
Save john20xdoe/4581d84aee8219f2154b5d6d0a70d7f7 to your computer and use it in GitHub Desktop.
Mac OS bash profile for improving terminal and common needs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MAC commands | |
# Alias commands for enable show.hide all files | |
alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app' | |
alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app' | |
# iTerm2 | |
# Set CLICOLOR if you want Ansi Colors in iTerm2 | |
export CLICOLOR=1 | |
# Set colors to match iTerm2 Terminal Colors | |
export TERM=xterm-256color | |
# iTerm2 shell integration | |
test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash" | |
# .nvm add to path | |
# https://github.com/creationix/nvm | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
# Add fastlane to PATH | |
export PATH="$HOME/.fastlane/bin:$PATH" | |
# Add Visual Studio Code (code) to PATH | |
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin" | |
# Git-Aware prompt for mac terminal and iTerm2 | |
# https://github.com/jimeh/git-aware-prompt | |
export GITAWAREPROMPT=~/.bash/git-aware-prompt | |
source "${GITAWAREPROMPT}/main.sh" | |
export PS1="\u@\h \W \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$ " | |
export SUDO_PS1="\[$bakred\]\u@\h\[$txtrst\] \w\$ " | |
# add Java to PATH | |
export JAVA_HOME=$(/usr/libexec/java_home) | |
export PATH=$PATH:$JAVA_HOME/bin | |
#add Maven to PATH | |
export PATH=$PATH:/Users/lbermejo/Documents/maven/apache-maven-3.5.2/bin | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment