-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
83 lines (67 loc) · 2.57 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
##########################
## zsh lib load script ##
##########################
ZSH_LIB_HOME="${HOME}/dotfiles/lib/zsh"
function loadLib() {
lib=${1:?"You have to specify a library file"}
if [ -f "${lib}" ]; then
source "${lib}"
fi
}
# alias load
loadLib $ZSH_LIB_HOME/alias/alias.sh
# function load
loadLib $ZSH_LIB_HOME/func/function.sh
# path load
loadLib $ZSH_LIB_HOME/path/path.sh
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/tanakanaohitoshi/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2>/dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/tanakanaohitoshi/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/tanakanaohitoshi/opt/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/tanakanaohitoshi/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
# <<< git prompt initialize >>>
# git-promptの読み込み
source ~/.zsh/git-prompt.sh
# git-completionの読み込み
fpath=(~/.zsh $fpath)
zstyle ':completion:*:*:git:*' script ~/.zsh/git-completion.bash
autoload -Uz compinit && compinit
# プロンプトのオプション表示設定
GIT_PS1_SHOWDIRTYSTATE=true
GIT_PS1_SHOWUNTRACKEDFILES=true
GIT_PS1_SHOWSTASHSTATE=true
GIT_PS1_SHOWUPSTREAM=auto
# プロンプトの表示設定(好きなようにカスタマイズ可)
setopt PROMPT_SUBST
PS1='%F{green}%n@%m%f: %F{cyan}%~%f %F{red}$(__git_ps1 "(%s)")%f
\$ '
# <<< end >>>
# ---------------------------------------------------------------#
# Anyenv Management #
# ---------------------------------------------------------------#
# @memo anyenvはnodevnやpyenvなどをanyenvのコマンドから統一できるツール
# anyenv
eval "$(anyenv init -)"
# pyenvを追加する(これを実行しないとsystemに乗っ取られる)
export PATH=$(pyenv root)/shims:$PATH
# rdenv
eval "$(rbenv init - zsh)"
# end
# ---------------------------------------------------------------#
# Env Management #
# ---------------------------------------------------------------#
# direnv
eval "$(direnv hook zsh)"
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/tanakanaohitoshi/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/tanakanaohitoshi/google-cloud-sdk/path.zsh.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/Users/tanakanaohitoshi/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/tanakanaohitoshi/google-cloud-sdk/completion.zsh.inc'; fi