-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
63 lines (52 loc) · 1.75 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
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
HOSTNAME=$(hostname -s)
# Source shared environment between Bash and Zsh
source_sh () {
emulate -LR sh
. "$@"
}
# Allow local customizations in the ~/.shell_local_before file
if [ -f $HOME/.shell_local_before ]; then
source $HOME/.shell_local_before
fi
# Allow local customizations in the ~/.zshrc_local_before file
if [ -f $HOME/.zshrc_local_before ]; then
source $HOME/.zshrc_local_before
fi
# Load all files from .shell/zshrc.d directory
if [ -d $HOME/.shellrc/common/zshrc.d ]; then
for file in $HOME/.shellrc/common/zshrc.d/*.zsh; do
source $file
done
fi
if [ -d $HOME/.shellrc/local/${HOSTNAME}/zshrc.d ]; then
for file in $HOME/.shellrc/local/${HOSTNAME}/zshrc.d/*.zsh; do
source $file
done
fi
# Load all files from .shell/rc.d directory
if [ -d $HOME/.shellrc/common/rc.d ]; then
for file in $HOME/.shellrc/common/rc.d/*.sh; do
source $file
done
fi
if [ -d $HOME/.shellrc/local/${HOSTNAME}/rc.d ]; then
for file in $HOME/.shellrc/local/${HOSTNAME}/rc.d/*.sh; do
source $file
done
fi
# Allow local customizations in the ~/.shell_local_after file
if [ -f $HOME/.shell_local_after ]; then
source $HOME/.shell_local_after
fi
# Allow local customizations in the ~/.zshrc_local_after file
if [ -f $HOME/.zshrc_local_after ]; then
source $HOME/.zshrc_local_after
fi
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
. "$HOME/.cargo/env"