-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_zsh.exports
170 lines (111 loc) · 5.34 KB
/
dot_zsh.exports
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
#!/bin/bash
# Bash Variables.
# https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Make `vim` the default editor.
export EDITOR="vim"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Ignore commands that start with spaces and duplicates.
# export HISTCONTROL=ignoreboth
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Increase the maximum number of lines of history
# persisted in the history file (default value is 500).
# export HISTFILESIZE=10000
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Don't add certain commands to the history file.
# export HISTIGNORE="&:[bf]g:c:clear:history:exit:q:pwd:* --help"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Increase the maximum number of commands recorded
# in the command history (default value is 500).
# export HISTSIZE=10000
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Prefer US English and use UTF-8 encoding.
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Use custom `less` colors for `man` pages.
# export LESS_TERMCAP_md="$(tput bold 2> /dev/null; tput setaf 2 2> /dev/null)"
# export LESS_TERMCAP_me="$(tput sgr0 2> /dev/null)"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Don't clear the screen after quitting a `man` page.
export MANPAGER="less -X"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Increase the maximum number of lines of history persisted
# in the `Node` REPL history file (default value is 1000).
#
# https://github.com/nodejs/node/blob/c948877688ff2b6a37f2c88724b656aae495c7b2/doc/api/repl.md#persistent-history
# export NODE_REPL_HISTORY_SIZE=10000
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Make new shells get the history lines from all previous
# shells instead of the default "last window closed" history.
# export PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Make Python use UTF-8 encoding for output to stdin/stdout/stderr.
export PYTHONIOENCODING="UTF-8"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Add rbenv as to path as a function (may not need, need to test installing again using brew.)
# add_to_path_end "$HOME/.rbenv/bin"
# export PATH="$HOME/.rbenv/bin:$PATH"
# if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# set homebrew path (not sure if needed, try installing brew again.)
# homebrew=/usr/local/bin:/usr/local/sbin
# add_to_path "$homebrew"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# java 8 home for building android
# unset first as Big Sur set default that we don't want
# https://developer.apple.com/forums/thread/666681
# unset JAVA_HOME
# java8_path="$(/usr/libexec/java_home -v "1.8.0")"
# export JAVA_HOME=$java8_path
# export STUDIO_JDK=$java8_path
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# android home
# export ANDROID_SDK_ROOT="$HOME/Library/Android/sdk"
# export ANDROID_HOME="$HOME/Library/Android/sdk"
# export PATH="$ANDROID_HOME/tools:$PATH"
# export PATH="$ANDROID_HOME/platform-tools:$PATH"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Add dotnet path manually as there is conflict problem with oh-my-zsh
# https://github.com/dotnet/cli/issues/1567
# export PATH=$PATH:"/usr/local/share/dotnet"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# nvm
# thanks to:
# https://medium.com/@dannysmith/little-thing-2-speeding-up-zsh-f1860390f92
# https://www.reddit.com/r/node/comments/4tg5jg/lazy_load_nvm_for_faster_shell_start/d5ib9fs/?context=3
declare -a NODE_GLOBALS=(`find ~/.nvm/versions/node -maxdepth 3 -type l -wholename '*/bin/*' | xargs -n1 basename | sort | uniq`)
NODE_GLOBALS+=("node")
NODE_GLOBALS+=("nvm")
load_nvm () {
echo "🚨 NVM not loaded! Loading now..."
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
}
for cmd in "${NODE_GLOBALS[@]}"; do
eval "${cmd}(){ unset -f ${NODE_GLOBALS}; load_nvm; nvm use || nvm use default; ${cmd} \$@ }"
done
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# miniconda
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/opt/homebrew/Caskroom/miniconda/base/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh" ]; then
. "/opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh"
else
export PATH="/opt/homebrew/Caskroom/miniconda/base/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# console-ninja
PATH=~/.console-ninja/.bin:$PATH
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# rbenv for ruby
# Added by `rbenv init` on Mon Sep 23 09:23:28 +07 2024
eval "$(rbenv init - --no-rehash zsh)"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -