-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
71 lines (54 loc) · 1.51 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
#! /bin/zsh
autoload -U compinit zrecompile
###
export TERM=xterm-256color
autoload -U colors
colors
# From http://sebastiancelis.com/2009/nov/16/zsh-prompt-git-users/
fpath=(~/.zsh.d/functions $fpath)
autoload -U ~/.zsh.d/functions/*(:t)
# Enable auto-execution of functions.
typeset -ga preexec_functions
typeset -ga precmd_functions
typeset -ga chpwd_functions
# Append git functions needed for prompt.
preexec_functions+='preexec_update_git_vars'
precmd_functions+='precmd_update_git_vars'
chpwd_functions+='chpwd_update_git_vars'
unsetopt correct
zsh_cache=${HOME}/.zsh_cache
mkdir -p $zsh_cache
if [ $UID -eq 0 ]; then
compinit
else
compinit -d $zsh_cache/zcomp-$HOST
for f in ~/.zshrc $zsh_cache/zcomp-$HOST; do
zrecompile -p $f && rm -f $f.zwc.old
done
fi
setopt extended_glob
for zshrc_snipplet in ~/.zsh.d/[0-9][0-9]*[^~] ; do
source $zshrc_snipplet
done
if [ -f ~/.localrc ]; then
source ~/.localrc
fi
if [ -f ~/.pw ]; then
source ~/.pw
fi
if [ -f ~/.smp ]; then
source ~/.smp
fi
### set title block
case $TERM in (xterm*|rxvt|screen)
precmd () { print -Pn "\e]0;${(%):-%n@%m - %~}\a" }
esac
#### end set-title-block
alias rake="noglob rake"
function j { local new_path="$(autojump $@)";if [ -n "$new_path" ]; then echo -e "\\033[31m${new_path}\\033[0m"; cd "$new_path";else false; fi }
### Initialize rbenv
eval "$(rbenv init -)"
### Initialize nodenv
eval "$(nodenv init -)"
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"