-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzshrc
More file actions
127 lines (97 loc) · 3.27 KB
/
zshrc
File metadata and controls
127 lines (97 loc) · 3.27 KB
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="robbyrussell"
# Aliases
if [ -e "$HOME/.aliases" ]; then
source "$HOME/.aliases"
fi
# Disable the update prompt
DISABLE_UPDATE_PROMPT="true"
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
# Comment this out to disable weekly auto-update checks
DISABLE_AUTO_UPDATE="true"
# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"
# Uncomment following line if you want to disable autosetting terminal title.
# DISABLE_AUTO_TITLE="true"
# Uncomment following line if you want red dots to be displayed while waiting for completion
# COMPLETION_WAITING_DOTS="true"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(adb ant brew bundler gem git github mix osx rails rake rbenv ruby svn tmux vi-mode)
# Custom Local Config
if [ -f "$HOME/.zshrc.local" ]; then
source "$HOME/.zshrc.local"
fi
# Homebrew
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH"
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
# Oh My ZSH
source $ZSH/oh-my-zsh.sh
# Re-inject search
bindkey '^R' history-incremental-search-backward
# Fix sbin on Mac
export PATH="/sbin:/usr/sbin:$PATH"
# MacVim
if [[ -d "/Applications/MacVim.app/Contents/bin" ]]; then
export PATH="/Applications/MacVim.app/Contents/bin:$PATH"
fi
# rbenv
if [[ -d "$HOME/.rbenv/bin" ]]; then
export PATH="$HOME/.rbenv/bin:$PATH"
fi
command -v rbenv >/dev/null 2>&1
if [ $? -eq 0 ]; then
eval "$(rbenv init -)"
fi
# binfiles
if [[ -d "$HOME/Development/Support/binfiles" ]]; then
export PATH="$HOME/Development/Support/binfiles:$PATH"
fi
# Android SDK & NDK
if [[ -d "$HOME/Library/Android/sdk" ]]; then
export ANDROID_HOME="$HOME/Library/Android/sdk"
export ANDROID_SDK_ROOT="$HOME/Library/Android/sdk"
export PATH="$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/tools/bin:$ANDROID_SDK_ROOT/platform-tools:$PATH"
fi
if [[ -d "$HOME/Library/Android/sdk/ndk-bundle" ]]; then
export ANDROID_NDK_ROOT="$HOME/Library/Android/sdk/ndk-bundle"
export PATH="$ANDROID_NDK_ROOT:$PATH"
fi
# Personal bin for Mac OS X
if [[ -d "$HOME/Library/bin" ]]; then
export PATH="$PATH:$HOME/Library/bin"
fi
# Editor
platform='unknown'
unamestr=`uname`
if [[ "$unamestr" == 'Darwin' ]]; then
platform='macosx'
elif [[ "$unamestr" == 'Linux' ]]; then
platform='linux'
fi
if hash zed 2>/dev/null; then
export EDITOR='zed --wait'
elif hash mvim 2>/dev/null; then
export EDITOR='mvim -f --nomru -c "au VimLeave * !open -a Terminal"'
elif hash gvim 2>/dev/null; then
export EDITOR="gvim -f"
else
export EDITOR="vi"
fi
# FZF
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# Rust, Cargo, etc.
[ -f ~/.cargo/env ] && source ~/.cargo/env
# NVM
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
# EMSDK
# [ -f ~/Development/Support/emsdk/emsdk_env.sh ] && source ~/Development/Support/emsdk/emsdk_env.sh