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.

143 lines
3.5 KiB

#Portable across both mac and linux now
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
7 years ago
# Test for clang and make it CC if found
if hash clang 2>/dev/null; then
export CC=/usr/bin/clang
fi
# Test for clang++ and add it to CXX if found
if hash clang++ 2>/dev/null; then
export CXX=/usr/bin/clang++
fi
if [[ "$OSTYPE" == "linux-gnu" ]]; then
# Linux
5 years ago
export VISUAL="nvim"
alias emacs="$VISUAL"
elif [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
export VISUAL="/usr/local/bin/nvim"
alias vim="$VISUAL"
fi
export EDITOR="$VISUAL"
9 years ago
export ITERM_24BIT=1
export TERM=screen-256color
8 years ago
export GOPATH=$HOME/go/
export PATH=$PATH:"$GOPATH/bin"
alias emacs='emacs -nw'
5 years ago
alias vim='nvim'
9 years ago
alias irssi='TERM=screen-256color irssi'
9 years ago
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'
9 years ago
9 years ago
# 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() {
gitbranch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
10 years ago
}
HISTFILE=~/.histfile
HISTSIZE=10000
SAVEHIST=10000
autoload -U colors && colors
10 years ago
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"
10 years ago
promptinit
plugins=(git brew npm coffee)
10 years ago
# User configuration
10 years ago
if [[ "$OSTYPE" == "darwin"* ]]; then
6 years ago
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin":$PATH
export PATH="$PATH:$HOME/.rvm/bin:/usr/lib/rstudio/bin" # Add RVM to PATH for scripting
. ~/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true
# Haskell stuff
export PATH=~/.cabal/bin:$PATH
export PATH=.cabal-sandbox/bin:$PATH
# Git Town
export PATH=~/git-town/src:$PATH
MANPATH=$MANPATH:~/git-town/man
# NOTE: 'Whence' is the ZSH idiom for bash's 'type'
export PRENPMPATH=$PATH
if [ -n "$(whence -f npm)" ];
then
NPMPATH="$(npm bin)"
if [ -d "$NPMPATH" ]; then
PATH=$NPMPATH:$PRENPMPATH
else
PATH=$PRENPMPATH
fi
export PATH=$PATH
fi
fi
10 years ago
# Android stuff - I develop android on Linux so these are specific to how I have it laid out in Linux
if [[ "$OSTYPE" == "linux-gnu" ]]; then
export PATH=/opt/android-studio:$PATH
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/platform-tools
fi
precmd(){
vcs_info
}
10 years ago
10 years ago
# 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%} "
9 years ago
# 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
# Source RVM if it exists
if [ -f /home/$USER/.rvm/scripts/rvm ]; then
source /home/$USER/.rvm/scripts/rvm
fi
7 years ago
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="/home/taylor/.sdkman"
[[ -s "/home/taylor/.sdkman/bin/sdkman-init.sh" ]] && source "/home/taylor/.sdkman/bin/sdkman-init.sh"