-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.profile
106 lines (78 loc) · 3.52 KB
/
.profile
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
#!/usr/bin/env bash
# Make vim the default editor.
export EDITOR='vim';
# Enable persistent REPL history for `node`.
export NODE_REPL_HISTORY=~/.node_history;
# Allow 32³ entries; the default is 1000.
export NODE_REPL_HISTORY_SIZE='32768';
# Use sloppy mode by default, matching web browsers.
export NODE_REPL_MODE='sloppy';
# Make Python use UTF-8 encoding for output to stdin, stdout, and stderr.
export PYTHONIOENCODING='UTF-8';
# Increase Bash history size. Allow 32³ entries; the default is 500.
export HISTSIZE='32768';
export HISTFILESIZE="${HISTSIZE}";
# Omit duplicates and commands that begin with a space from history.
export HISTCONTROL='ignoreboth';
# Prefer US English and use UTF-8.
export LANG='en_US.UTF-8';
export LC_ALL='en_US.UTF-8';
# Highlight section titles in manual pages.
export LESS_TERMCAP_md="${yellow}";
# Don’t clear the screen after quitting a manual page.
export MANPAGER='less -X';
# Avoid issues with `gpg` as installed via Homebrew.
# https://stackoverflow.com/a/42265848/96656
export GPG_TTY=$(tty);
# Hide the “default interactive shell is now zsh” warning on macOS.
export BASH_SILENCE_DEPRECATION_WARNING=1;
# ########################### custom your exports here ###################################
if [[ `uname -s` == "Darwin" ]]; then
export HOMEBREW_NO_AUTO_UPDATE=1
BREW_PREFIX=$(brew --prefix)
#if which brew &> /dev/null && brew list --formula | grep coreutils > /dev/null; then
PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH"
#fi
#if which brew &> /dev/null && brew list --formula | grep make > /dev/null; then
PATH="$(brew --prefix make)/libexec/gnubin:$PATH"
#fi
#if which brew &> /dev/null && brew list --formula | grep gnu-sed > /dev/null; then
PATH="$(brew --prefix gnu-sed)/libexec/gnubin:$PATH"
#fi
#if which brew &> /dev/null && brew list --formula | grep openjdk > /dev/null; then
JDK_PREFIX=$(brew --prefix openjdk)
PATH="${JDK_PREFIX}/bin:$PATH"
#fi
# for emacs eaf depens bins
PATH=$PATH:"/Users/zxh/Library/Python/3.9/lib/python/site-packages"
# PATH="$PATH:/Library/TeX/texbin"
#------------------------------------------------------------
# openssl 版本问题
# 使用 openssl@3
# export LDFLAGS="-L${BREW_PREFIX}/opt/openssl@3/lib"
# export CPPFLAGS="-I${BREW_PREFIX}/opt/openssl@3/include -I${JDK_PREFIX}/include"
# export PATH="${BREW_PREFIX}/opt/openssl@3/bin:$PATH"
# 使用 [email protected]
export LDFLAGS="-L${BREW_PREFIX}/opt/[email protected]/lib"
export CPPFLAGS="-I${BREW_PREFIX}/opt/[email protected]/include -I${JDK_PREFIX}/include"
export PATH="${BREW_PREFIX}/opt/[email protected]/bin:$PATH"
. ${BREW_PREFIX}/share/liquidprompt && . ${BREW_PREFIX}/etc/profile.d/z.sh && . $(brew --prefix asdf)/libexec/asdf.sh
fi
if [[ `uname -s` == "Linux" ]]; then
[[ $- = *i* ]] && source ~/.liquidprompt/liquidprompt && . ~/z/z.sh && . $HOME/.asdf/asdf.sh
fi
if which asdf &> /dev/null && asdf list | grep rust > /dev/null; then
PATH=$PATH:$(asdf where rust)/bin
fi
if which asdf &> /dev/null && asdf list | grep golang > /dev/null; then
export GOPATH="/Users/zxh/githubs/go"
export GOROOT=$(asdf where golang)/go
PATH=$PATH:${GOROOT}/bin
PATH=$PATH:$GOPATH/bin
#go env -w GOPROXY=https://goproxy.cn,https://mirrors.aliyun.com/goproxy/,direct
fi
if which asdf &> /dev/null && asdf list | grep erlang > /dev/null; then
PATH=$PATH:$(asdf where erlang)/bin
fi
export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java))))
export PATH=$PATH:$JAVA_HOME/bin