Skip to content

Instantly share code, notes, and snippets.

@ckirsch
Last active February 22, 2016 14:12
Show Gist options
  • Save ckirsch/5077194 to your computer and use it in GitHub Desktop.
Save ckirsch/5077194 to your computer and use it in GitHub Desktop.
Mac .profile bash script managing MacPorts, MacTeX, Sublime, and git.
# Mac OS X bash ~/.profile
# MacPorts Installer adding an appropriate PATH variable for use with MacPorts.
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
# Use MacTeX rather than MacPorts for TeX
export PATH=/usr/texbin:$PATH
# Find my scripts
export PATH=$HOME/Dropbox/usr/local/bin:$PATH
# Find cross compilers
export PATH=$PATH:$HOME/Dropbox/Tools/i386-elf/bin
export PATH=$PATH:$HOME/Dropbox/Tools/mips-elf/bin
# Set Java CLASSPATH
export CLASSPATH=.
# Enable Sublime startup from Terminal
export EDITOR='subl -w'
# git shortcuts adapted from gitimmersion.com
alias gs='git status'
alias gd='git diff'
alias ga='git add'
alias gb='git branch'
alias go='git checkout'
alias gc='git commit'
alias gp='git push'
alias gh='git hist'
alias gf='git fetch'
alias gl='git pull'
alias gm='git merge'
alias gr='git remote'
alias gk='gitk --all&'
alias gx='gitx --all'
alias got='git'
alias get='git'
source $HOME/Dropbox/usr/local/bin/git-completion.bash
source $HOME/Dropbox/usr/local/bin/git-prompt.sh
export GIT_PS1_SHOWDIRTYSTATE=true
export GIT_PS1_SHOWSTASHSTATE=true
export GIT_PS1_SHOWUNTRACKEDFILES=true
export GIT_PS1_SHOWUPSTREAM=auto
export PS1='\u@\h:\W$(__git_ps1 "(%s)")\$ '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment