-
Notifications
You must be signed in to change notification settings - Fork 7
/
.zshrc
105 lines (81 loc) · 1.9 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
98
99
100
101
102
103
104
#
# Global fixes
#
# Needed to start up zsh
export PATH=$PATH:/opt/homebrew/bin
source ${ZDOTDIR:-~}/.antidote/antidote.zsh
# For sudo-ing aliases
# https://wiki.archlinux.org/index.php/Sudo#Passing_aliases
alias sudo='sudo '
# Ensure languages are set
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# Ensure editor is set
export EDITOR=vim
# Start X at login for Arch boxes
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]] ; then
if hash startx 2>& /dev/null; then
startx && logout
fi
fi
# This fixes using SSH in urxvt
if [[ $TERM == 'rxvt-unicode' ]] ; then
export TERM='xterm'
fi
#
# Work specific config
#
if [[ -f ~/.zshrc-amazon ]]; then
source ~/.zshrc-amazon
fi
#
# OS Detection
#
UNAME=`uname`
# Fallback info
CURRENT_OS='Linux'
DISTRO=''
if [[ $UNAME == 'Darwin' ]]; then
CURRENT_OS='OS X'
else
# Must be Linux, determine distro
if [[ -f /etc/redhat-release ]]; then
# CentOS or Redhat?
if grep -q "CentOS" /etc/redhat-release; then
DISTRO='CentOS'
else
DISTRO='RHEL'
fi
fi
fi
# Use zsh-completions if it exists
if [[ -d "/usr/local/share/zsh-completions" ]]; then
fpath=(/usr/local/share/zsh-completions $fpath)
fi
# Load Antidote
source <(antidote init)
antidote bundle jdavis/zsh-files
antidote bundle rupa/z
#
# antidote Theme
#
#antidote bundle jdavis/zsh-files path:themes/jdavis
#
# antidote Bundles
#
antidote bundle zsh-users/zsh-completions
antidote bundle zsh-users/zsh-autosuggestions
antidote bundle zsh-users/zsh-syntax-highlighting
# OS specific plugins
if [[ $CURRENT_OS == 'OS X' ]]; then
#antidote bundle brew
#antidote bundle brew-cask
elif [[ $CURRENT_OS == 'Linux' ]]; then
# None so far...
if [[ $DISTRO == 'CentOS' ]]; then
fi
elif [[ $CURRENT_OS == 'Cygwin' ]]; then
fi
# Secret info
antidote bundle [email protected]:jdavis/secret.git