-
Notifications
You must be signed in to change notification settings - Fork 1
/
zshrc
79 lines (66 loc) · 2.05 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
# 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
#
# Executes commands at the start of an interactive session.
#
# modify fpath before call compinit
fpath=(
# "/usr/share/zsh/$ZSH_VERSION/functions"
# "/usr/share/zsh/site-functions"
"$HOME/lib/dotfiles/zsh"
"$HOME/lib/dotfiles/zsh/completion"
$fpath
)
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
# Customize to your needs...
# source ~/lib/dotfiles/purepower
# source ~/lib/dotfiles/zsh/completion.zsh
source ~/lib/dotfiles/zsh/functions.zsh
source ~/lib/dotfiles/zsh/keys.zsh
source ~/lib/dotfiles/zsh/ssh.zsh
source ~/lib/dotfiles/zsh/aliases.zsh
# fzf via local installation
if [ -e ~/.fzf ]; then
export PATH="$PATH:$HOME/.fzf/bin"
source ~/.fzf/shell/key-bindings.zsh
source ~/.fzf/shell/completion.zsh
fi
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
__pyenv_version_ps1 ()
{
local ret=$?;
if [ -n "${PYENV_VERSION}" ]; then
echo -n "(${PYENV_VERSION}) "
fi
return $?
}
# export PS1='\n$(pyenv version-name)\n'$PS1
if command -v pyenv 1>/dev/null 2>&1; then
PS1="\$(__pyenv_version_ps1)${PS1}"
fi
if [ -n "$TMUX" ]; then
function refresh {
eval $(tmux show-env -s | grep '^SSH_')
eval $(tmux show-env -s | grep '^DISPLAY')
}
else
function refresh { :; }
fi
# Watch new users
# watch=(all)
# LOGCHECK=5
[ -f $HOME/lib/dotfiles/zsh/locals.zsh ] && source $HOME/lib/dotfiles/zsh/locals.zsh
# pyenv
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
fi
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
# [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh