-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathzshrc
More file actions
52 lines (42 loc) · 1003 Bytes
/
zshrc
File metadata and controls
52 lines (42 loc) · 1003 Bytes
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
# Only allow loading once
# to reload run 'unset ZSH_LOADED'
# if [[ "$ZSH_LOADED" == true ]];then
# echo "Settings already loaded"
# return
# fi
# export ZSH_LOADED=true
# Path to dotfiles repo
export DOTFILES="$(dirname $(readlink $HOME/.zshrc))"
# Loads a local settings file for sekrets
if [[ -e $HOME/.localrc ]]
then
source $HOME/.localrc
fi
if [[ $OSTYPE == darwin* ]];then
export OSX=true
fi
# Set the path to include:
# - /usr/local/bin for Homebrew
# - /usr/local/sbin
# - /usr/bin for system executable
# - /bin
# - /usr/sbin
# - /sbin
# - $HOME/.bin for local tools
export PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:$HOME/.bin"
# Find all zsh files
typeset -U configs
configs=($DOTFILES/**/*.zsh)
for file in ${configs:#*/completions.zsh}
do
source $file
done
# Load autocomplete and other zsh stuff
autoload -Uz compinit
compinit -i
for file in ${(M)configs:#*/completions.zsh}
do
source $file
done
unset configs
colorize