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.
103 lines
2.7 KiB
103 lines
2.7 KiB
#Portable across both mac and linux now |
|
export ZSH=~/.oh-my-zsh |
|
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" |
|
fi |
|
export EDITOR="$VISUAL" |
|
export ITERM_24BIT=1 |
|
export TERM=rxvt-256color |
|
|
|
# Colors get weird with Emacs in urxvt. I use urxvt on Linux |
|
# so I need to export rxvt-256color and copy the rxvt-256color terminfo |
|
# to the right location (see package installer for details). |
|
# This will need to be changed if you use a different terminal emulator. |
|
# |
|
# Currently disabled to test automatic terminal detection |
|
#if [[ "$OSTYPE" == "linux-gnu" ]]; then |
|
# export TERM=rxvt-256color |
|
#else |
|
# export TERM=xterm-256color |
|
#fi |
|
|
|
alias emacs='emacs -nw' |
|
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' |
|
|
|
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" |
|
|
|
# This is for nix if it exists |
|
if [ -f ~/.nix-profile/etc/profile.d/nix.sh ]; |
|
then |
|
source ~/.nix-profile/etc/profile.d/nix.sh |
|
fi |
|
|
|
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 |
|
|
|
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 |
|
|
|
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%} " |
|
|
|
# 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
|
|
|