You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

118 lines
2.9 KiB

source ~/.bash_profile
#Portable across both mac and linux now
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
if [[ "$OSTYPE" == "linux-gnu" ]]; then
# Linux
export VISUAL="nvim"
alias vim="$VISUAL"
elif [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
export VISUAL="/usr/local/bin/nvim"
alias vim="$VISUAL"
# Give access to mono (if installed via the .pkg) early on
export PATH=/Library/Frameworks/Mono.framework/Versions/Current/bin/:${PATH}
fi
export EDITOR="$VISUAL"
export ITERM_24BIT=1
export TERM=xterm-256color
export GOPATH=$HOME/go
export GOBIN=$GOPATH/bin
export PATH=$PATH:$GOBIN
# TODO: PUT THIS IN AN IF PYENV EXISTS CHECK
eval "$(pyenv init -)"
# Emacs needs to be setup different on Linux and Mac
if [[ "$OSTYPE" == "darwin"* ]]; then
alias emacs='/Applications/Emacs.app/Contents/MacOS/Emacs -nw'
else
alias emacs='emacs -nw'
fi
alias irssi='TERM=screen-256color irssi'
alias scheme='rlwrap mit-scheme'
alias startpg='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start'
alias stoppg='pg_ctl -D /usr/local/var/postgres stop'
# This is for the mac GUI version of emacs.
alias emacs-gui='open -a /Applications/Emacs.app $1'
# Git specific aliases
alias gp='git push'
alias gs='git status'
alias gd='git diff'
alias gc='git commit -v'
alias gb='git branch'
alias gbd='git branch -d'
alias gbdd='git branch -D'
alias gpu='git pull'
alias gm='git merge'
alias gf='git fetch'
alias ga='git add .'
gblame() {
builtin git blame $1
}
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
HISTFILE=~/.histfile
HISTSIZE=10000
SAVEHIST=10000
autoload -U colors && colors
autoload -U promptinit
autoload -U compinit && compinit
autoload -Uz vcs_info
zstyle ':completion:*' menu select
zstyle ':vcs_info:git*' formats "%{$fg[white]%}[%{$reset_color%}%{$fg[blue]%}%b%{$fg[white]%}]%{$reset_color%} %a"
promptinit
plugins=(git brew npm coffee)
# User configuration
if [[ "$OSTYPE" == "darwin"* ]]; then
export MYSQL_PATH=/usr/local/Cellar/mysql/5.6.27
export PATH=$PATH:$MYSQL_PATH/bin
# Brew
export PATH=$PATH:/usr/local/bin
# Haskell stuff
export PATH=~/.cabal/bin:$PATH
export PATH=.cabal-sandbox/bin:$PATH
# Groovy
export GROOVY_HOME=/usr/local/opt/groovy/libexec
# Gradle
export GRADLE_HOME=/usr/local/opt/gradle/4.5/libexec
export PATH=$PATH:/usr/local/opt/gradle/4.5/libexec
fi
precmd(){
vcs_info
}
# Set up custom prompt
setopt PROMPT_SUBST
RPROMPT="%{$fg[white]%}\${vcs_info_msg_0_}%{$reset_color%}"
PROMPT="%{$fg[white]%}┌%{$reset_color%}[%{$fg[yellow]%}%n%{$reset_color%}@%{$fg[cyan]%}%m%{$reset_color%}]─[%{$fg[green]%}%d%{$reset_color%}]
%{$fg[white]%}└─╼%{$reset_color%} "
# Run opam init
if hash opam 2>/dev/null; then
~/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
eval `opam config env`
fi
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
export PATH="/usr/local/opt/cython/bin:$PATH"