-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzshrc
More file actions
83 lines (68 loc) · 1.8 KB
/
zshrc
File metadata and controls
83 lines (68 loc) · 1.8 KB
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
#
# .zshrc
#
autoload -Uz compinit
compinit
if [[ -e ~/.profile ]]; then
source ~/.profile
fi
if [[ -e ~/.zshrc.local ]]; then
source ~/.zshrc.local
fi
#
# Handle plugins
#
# zinit - https://github.com/zdharma/zinit
if [[ -e $HOME/.zinit/bin/zinit.zsh ]]; then
source "$HOME/.zinit/bin/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
# add our preferred plugins
zinit snippet OMZ::plugins/vi-mode/vi-mode.plugin.zsh
zinit light zsh-users/zsh-syntax-highlighting
zinit light spaceship-prompt/spaceship-prompt
zinit light spaceship-prompt/spaceship-vi-mode
else
echo "zinit not installed."
export PS1="$"
fi
#
# Additional user configuration
#
unsetopt SHARE_HISTORY
unsetopt INC_APPEND_HISTORY
export \
SPACESHIP_EXIT_CODE_SHOW=true \
SPACESHIP_TIME_SHOW=true \
SPACESHIP_PROMPT_ORDER=(
time # Time stamps section
user # Username section
dir # Current directory section
host # Hostname section
git # Git section (git_branch + git_status)
package # Package version
aws # Amazon Web Services section
# kubecontext # Kubectl context section
terraform # Terraform workspace section
exec_time # Execution time
line_sep # Line break
vi_mode # Vi-mode indicator
jobs # Background jobs indicator
exit_code # Exit code section
char # Prompt character
)
which kubectl >/dev/null 2>&1
if [[ $? == 0 ]]; then
source <(kubectl completion zsh)
fi
fpath=(/usr/local/share/zsh-completions $fpath)
#
# Tooling integrations
#
# direnv - https://direnv.net/
which direnv > /dev/null 2>&1
if [[ $? == 0 ]]; then
eval "$(direnv hook zsh)"
fi
# fzf - https://github.com/junegunn/fzf
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh