-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
97 lines (89 loc) · 2.49 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
#!/usr/bin/env zsh
# vi: set ft=zsh:
####
#
# executes third if shell is interactive
#
autoload -U colors && colors
SOURCE="$HOME/.zshrc"
while [ -h "$SOURCE" ]; do
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
done
export DOTFILES_ROOT="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
# Used to load all the functions that are used
for directory in $(ls $DOTFILES_ROOT/lib/zsh/functions); do
if [ -d $DOTFILES_ROOT/lib/zsh/functions/${directory} ]; then
fpath=($DOTFILES_ROOT/lib/zsh/functions/${directory}/ $fpath)
autoload -U $directory
fi
done
####
#
# Highest priority is top of list
#
PATH_ARRAY=(
$HOME/bin.local
$HOME/bin
$HOME/.composer/vendor/bin
$HOME/.chefdk/gem/ruby/2.1.0/bin
$HOME/Library/Python/3.6/bin
/usr/local/Cellar/ruby/2.2.0/bin
/usr/local/heroku/bin
/opt/local/bin
/usr/local/bin
/usr/local/sbin
/usr/local/MacGPG2/bin
/usr/local/opt/ruby/bin
/usr/local/opt/coreutils/libexec/gnubin
/usr/local/opt/icu4c/bin
/usr/local/opt/icu4c/sbin
/usr/local/opt/gettext/bin
/usr/bin
/bin
/usr/X11/bin
/usr/sbin
/sbin
)
PATH=""
for p in ${PATH_ARRAY[*]}; do
if [ -d $p ]; then
PATH=$PATH:$p
fi
done
PATH="${PATH:1:${#PATH}}"
export PATH
unset PATH_ARRAY
# Selectively source scripts
scripts=(misc)
for script ($scripts); do
if [ -f $DOTFILES_ROOT/lib/scripts/$script.zsh ]; then
source $DOTFILES_ROOT/lib/scripts/$script.zsh
fi
done
# Some of the plugins are required for core functionality, others
# can be removed
source $DOTFILES_ROOT/plugins.zsh
for plugin ($plugins); do
if [ -f $DOTFILES_ROOT/lib/plugins/$plugin/$plugin.plugin.zsh ]; then
fpath=($DOTFILES_ROOT/lib/plugins/$plugin $fpath)
source $DOTFILES_ROOT/lib/plugins/$plugin/$plugin.plugin.zsh
fi
done
# Prompt
# http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html
PS1='%f%k%F{magenta}%n%F{grey}@%F{yellow}%M %F{green}[%F{blue}$(phpbrew_current_php_version)%F{green}][%F{cyan}${vcs_info_msg_0_}%F{green}]%f%k
%F{green}%~%f%k %F{grey}%#%f%k '
#PS1='%f%k%F{magenta}%n%F{grey}@%F{yellow}%M %F{green}[%F{blue}%F{green}][%F{cyan}${vcs_info_msg_0_}%F{green}]%f%k
#%F{green}%~%f%k %F{grey}%#%f%k '
RPS1='%f%k'
RPS2='%f%k'
eval `dircolors $DOTFILES_ROOT/lib/dircolors/dircolors.ansi-dark`
export ZLS_COLORS=$LS_COLORS
clear
#uptime
#log
#from 2>/dev/null
#msgs
export PATH="/usr/local/opt/mysql-client/bin:$PATH"