forked from mattfoster/zshkit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
01_path
57 lines (48 loc) · 1.49 KB
/
01_path
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
# Add some dirs to the path.
pathdirs=(/Library/Frameworks/Python.framework/Versions/Current/bin
/usr/local/ActivePerl-5.10/bin
/usr/local/ActivePerl-5.10/site/bin
/usr/local/bin
/usr/local/git/bin
/usr/local/libexec/git-core
/var/lib/gems/1.8/bin
/opt/local/bin
~/bin )
for dir ($pathdirs)
if [[ -d $dir ]]; then
path=($dir $path)
fi
cdpath=(~ ~/Projects ~/Work)
# Allow MacPorts man pages and others
dirs=( /usr/local/git/man
/sw/share/man
/opt/local/man /usr/local/man
~/Docs/man
/usr/local/ActivePerl-5.10/man
/usr/local/ActivePerl-5.10/site/man)
for dir ($dirs)
if [[ -x $dir ]]; then
manpath=($manpath $dir)
fi
# Add function paths
# funcdirs=( $HOME/.zsh/func /sw/share/zsh/ /sw/share/zsh/VCS_Info /sw/share/zsh/VCS_Info/Backends)
# I'm using a manually installed zsh 4.3.9
binary=$(which zsh)
install_path=$binary:h:h # Strip bin/zsh to find installation path.
funcdirs=( $HOME/.zsh/func $install_path/share/zsh/4.3.9/functions
$install_path/share/zsh/4.3.6/functions
$install_path/share/zsh/4.2.6/functions
/usr/share/zsh/4.2.6/functions
/usr/share/zsh/4.3.6/functions
)
for dir ($funcdirs)
if [[ -x $dir ]]; then
fpath=($fpath $dir)
fi
typeset -gU path cdpath manpath fpath
# A few named directories cd by doing cd ~D etc.
D=~/Documents
DL=~/Downloads
P=~/Projects
W=~/work
Z=~/Projects/zshkit