forked from majnemer/davesdots
-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
58 lines (47 loc) · 1.16 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
# .zshrc
# Current author: David Majnemer
# Original author: Saleem Abdulrasool <[email protected]>
# vim:set nowrap:
case `uname -s` in
Darwin)
export LHOSTNAME=`scutil --get LocalHostName`
;;
*)
export LHOSTNAME=${HOST}
;;
esac
autoload compinit; compinit -d "${HOME}/.zsh/.zcompdump-${LHOSTNAME}"
autoload age
autoload zmv
if [ ${ZSH_VERSION//.} -gt 420 ] ; then
autoload -U url-quote-magic
zle -N self-insert url-quote-magic
fi
autoload -U edit-command-line
zle -N edit-command-line
# Keep track of other people accessing the box
watch=( all )
export LOGCHECK=30
export WATCHFMT=$'\e[00;00m\e[01;36m'" -- %n@%m has %(a.logged in.logged out) --"$'\e[00;00m'
# directory hashes
if [ -d "${HOME}/sandbox" ] ; then
hash -d sandbox="${HOME}/sandbox"
fi
if [ -d "${HOME}/work" ] ; then
hash -d work="${HOME}/work"
for dir in "${HOME}"/work/*(N-/) ; do
hash -d $(basename "${dir}")="${dir}"
done
fi
# common shell utils
if [ -d "${HOME}/.commonsh" ] ; then
for file in "${HOME}"/.commonsh/*(N.x:t) ; do
. "${HOME}/.commonsh/${file}"
done
fi
# extras
if [ -d "${HOME}/.zsh" ] ; then
for file in "${HOME}"/.zsh/*(N.x:t) ; do
. "${HOME}/.zsh/${file}"
done
fi