forked from bitemyapp/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
118 lines (93 loc) · 3.73 KB
/
.zshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
autoload -U promptinit && promptinit
autoload -U compinit && compinit
autoload -U colors && colors
unsetopt correct_all
unsetopt correct
bindkey '^U' backward-kill-line
bindkey '^Y' yank
# base -> [%n@%m %~]$
export LSCOLORS=GxFxCxDxBxegedabagaced
zstyle ':completion:*' expand 'yes'
zstyle ':completion:*' squeeze-slashes 'yes'
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' '+l:|=*'
alias grep='grep --colour=auto'
alias less='less -R'
alias mg='mg -n'
alias qke='emacs -q -nw'
alias gpo='git pull origin && git push origin'
alias gpoc='git pull origin `git name-rev --name-only HEAD` && git push origin `git name-rev --name-only HEAD`'
alias gpom='git pull origin master'
alias gpgm='git pull gh master'
alias gl='git log --oneline --graph --decorate --all'
alias glr='git shortlog --format=format:"%cI %s"'
alias ph='gpom && gphm'
alias act='source `find . -name "activate" | grep "bin/activate"`'
alias kill-ghc-modi="ps aux | grep ghc-modi | grep -v grep | awk '{print $2}' | xargs kill"
alias repl='cabal repl --with-ghc=ghci-ng'
alias hgdiff='hg diff | colordiff | less -R'
export EDITOR="emacs -q -nw"
export GIT_EDITOR="emacs -q -nw"
# I am baffled that I even have to do this.
bindkey ';5D' emacs-backward-word
bindkey ';5C' emacs-forward-word
bindkey -e
# bindkey '^[[1;5D' forward-word
# bindkey '^[[1;5C' backward-word
# bindkey '^[[1;9C' forward-word
# bindkey '^[[1;9D' backward-word
export MARKPATH=$HOME/.marks
function jump {
cd -P $MARKPATH/$1 2>/dev/null || echo "No such mark: $1"
}
function mark {
mkdir -p $MARKPATH; ln -s $(pwd) $MARKPATH/$1
}
function unmark {
rm -i $MARKPATH/$1
}
# function marks {
# ls -l $MARKPATH | sed 's/ / /g' | cut -d' ' -f9- | sed 's/ -/\t-/g' && echo
# }
function marks {
\ls -l $MARKPATH | tail -n +2 | sed 's/ / /g' | cut -d' ' -f9- | awk -F ' -> ' '{printf "%-10s -> %s\n", $1, $2}'
}
export TERM=xterm-256color
export PATH=.cabal-sandbox/bin:~/bin:~/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.1/bin:/opt/happy/1.19.4/bin:/opt/alex/3.1.3/bin:/usr/local/bin:$HOME/code/ghc/bin:$HOME/Library/Haskell/bin:$HOME/.cabal/bin:~/bin:$PATH:$HOME/.carton/bin:~/bin:/Applications/Postgres.app/Contents/MacOS/bin:/usr/bin:/bin:/usr/sbin:/sbin:~/bin/FDK/Tools/osx:/usr/local/share/npm/bin
export PATH=~/.cask/bin:$PATH
export PATH=~/.screenlayout:$PATH
export FPATH=$HOME/.zsh_completion:$FPATH
# OPAM configuration
. ~/.opam/opam-init/init.zsh > /dev/null 2> /dev/null || true
export PRE_NIX_PATH=$PATH
export GHC_DOT_APP="/Applications/ghc-7.8.3.app"
if [ -d "$GHC_DOT_APP" ]; then
export PATH="${HOME}/.cabal/bin:${GHC_DOT_APP}/Contents/bin:${PATH}"
fi
export PATH=/usr/local/texlive/2015/bin/x86_64-darwin:$PATH
export PATH=$HOME/.local/bin:$PATH
export PATH=$HOME/.stack/programs/x86_64-osx/ghc-7.10.2/bin:$PATH
export PATH=/opt/ghc/8.0.1/bin:$PATH
export PATH=$HOME/work/node-v4.2.0-linux-x64/bin:$PATH
export PATH=$HOME/.bin:$PATH
source ~/.secrets
function git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$ZSH_THEME_GIT_PROMPT_SUFFIX"
}
setopt prompt_subst
PROMPT='%{%F{white}%}[ %{%F{blue}%}%n@%m %{%F{cyan}%}%~%{%F{white}%} $(git_prompt_info) $(parse_git_dirty)]
%{%F{reset}%}$ '
parse_git_branch() {
(command git symbolic-ref -q HEAD || command git name-rev --name-only --no-undefined --always HEAD) 2>/dev/null
}
parse_git_dirty() {
if command git diff-index --quiet HEAD 2> /dev/null; then
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
else
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
fi
}
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}✔ %{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}✗ %{$reset_color%}"
export NVM_DIR="/home/callen/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm