-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
92 lines (71 loc) · 1.95 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
84
85
86
87
88
89
90
91
92
# Locales
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# Homebrew
export HOMEBREW_PREFIX="/opt/homebrew"
# Path
export PATH="$HOMEBREW_PREFIX/bin:$HOMEBREW_PREFIX/sbin:$PATH:$HOME/.local/bin:$HOME/bin"
# Editor
if command -v nvim > /dev/null; then
export EDITOR=nvim
fi
# Oh-my-zsh
if [ -d "$HOME/.oh-my-zsh" ]; then
export ZSH="$HOME/.oh-my-zsh"
# shellcheck disable=SC2034
ZSH_THEME="robbyrussell"
source "$ZSH/oh-my-zsh.sh"
fi
# ZSH Autosuggestions
if [ -f "$HOMEBREW_PREFIX/share/zsh-autosuggestions/zsh-autosuggestions.zsh" ]; then
source "$HOMEBREW_PREFIX/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
fi
# Completions
autoload -U +X bashcompinit && bashcompinit
# FZF
[ -f "$HOME/.fzf.zsh" ] && source "$HOME/.fzf.zsh"
# Git
GPG_TTY=$(tty)
export GPG_TTY
# Pipx
if command -v pipx > /dev/null; then
autoload -U compinit && compinit
eval "$(register-python-argcomplete pipx)"
fi
# Vault
if command -v vault > /dev/null; then
complete -o nospace -C "$(which vault)" vault
fi
# Gnu sed
if [ -d "$HOMEBREW_PREFIX/opt/gnu-sed/libexec/gnubin" ]; then
export PATH="$HOMEBREW_PREFIX/opt/gnu-sed/libexec/gnubin:$PATH"
fi
# Homebrew
# https://github.com/orgs/Homebrew/discussions/4133
if type brew &>/dev/null
then
export HOMEBREW_NO_INSTALL_FROM_API=1
FPATH="$HOMEBREW_PREFIX/share/zsh/site-functions:${FPATH}"
autoload -Uz compinit
compinit
fi
# kubebuilder autocompletion
if command -v kubebuilder > /dev/null; then
. <(kubebuilder completion zsh)
fi
# Direnv
eval "$(direnv hook zsh)"
# Custom profiles
if [ -f "$HOME/.aliases.zsh" ]; then
source "$HOME/.aliases.zsh"
fi
if [ -f "$HOME/.elastic.zsh" ]; then
source "$HOME/.elastic.zsh"
fi
if [ -f "$HOME/.personal.zsh" ]; then
source "$HOME/.personal.zsh"
fi
# Generated by Hermit; START; DO NOT EDIT.
HERMIT_ROOT_BIN="${HERMIT_ROOT_BIN:-"$HOME/bin/hermit"}"
eval "$(test -x $HERMIT_ROOT_BIN && $HERMIT_ROOT_BIN shell-hooks --print --zsh)"
# Generated by Hermit; END; DO NOT EDIT.