-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
96 lines (79 loc) · 2.8 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
93
94
95
# 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
setopt notify
setopt noclobber
setopt ignoreeof
setopt appendhistory
setopt extended_history
setopt hist_expire_dups_first
setopt hist_ignore_dups
setopt hist_verify
setopt share_history
setopt autocd
setopt extendedglob
setopt interactivecomments
unsetopt beep
source ~/.dotfiles/antigen.zsh
antigen use oh-my-zsh
antigen bundle asdf
antigen bundle aws
antigen bundle bazel
antigen bundle colored-man-pages
antigen bundle command-not-found
antigen bundle copyfile
antigen bundle docker
antigen bundle docker-compose
antigen bundle fzf
antigen bundle git
antigen bundle golang
antigen bundle gradle
antigen bundle httpie
antigen bundle iterm2
antigen bundle kn
antigen bundle kubectl
antigen bundle minikube
antigen bundle thefuck
antigen bundle zsh-users/zsh-completions
antigen bundle zsh-users/zsh-autosuggestions
# Must be the last thing to register ZLE related stuff!
antigen bundle zsh-users/zsh-syntax-highlighting
antigen theme romkatv/powerlevel10k
antigen apply
. $SRCDIR/shell/aliases.zsh
. $SRCDIR/shell/variables.zsh
[[ -f ~/.fzf.zsh ]] && source ~/.fzf.zsh
[[ -f ~/.p10k.zsh ]] && source ~/.p10k.zsh
[[ -f /etc/static/zshrc ]] && . /etc/static/zshrc
[[ -f $SRCDIR_PRIVATE/.zshrc ]] && . $SRCDIR_PRIVATE/.zshrc
# OS-specific changes
if [[ "$UNAME" == "Darwin" ]]; then
. $SRCDIR/shell/aliases.macos.zsh
elif [[ "$UNAME" == "Linux" ]]; then
. $SRCDIR/shell/aliases.linux.zsh
fi
# ############################################################################ #
fpath+=(
~/.dotfiles/shell/fpath
~/.dotfiles-private/shell/fpath
)
# just all functions in fpath are loaded in
# * (.:t) - wildcard options
# ^ . means only files
# ^ :t means only filename
autoload -Uz ~/.dotfiles/shell/fpath/*(.:t)
autoload -Uz ~/.dotfiles-private/shell/fpath/*(.:t)
command -v thefuck >/dev/null 2>/dev/null && source <(thefuck --alias)
# Homebrew integration
[[ -x /opt/homebrew/bin/brew ]] && eval "$(/opt/homebrew/bin/brew shellenv)"
[[ -n "$ITERM_SESSION_ID" ]] && [[ -f ~/.dotfiles/iterm2-shell-integration.zsh ]] && source ~/.dotfiles/iterm2-shell-integration.zsh
# https://unix.stackexchange.com/questions/608842/zshrc-export-gpg-tty-tty-says-not-a-tty
# 1) powerlevel10k instant prompt affects this
# 2) recommended solution is to not use tty command
export GPG_TTY="$TTY"
gpg-connect-agent updatestartuptty /bye >/dev/null 2>/dev/null
# https://github.com/alacritty/alacritty/issues/2950#issuecomment-706610878
printf "\e[?1042l"