This repository has been archived by the owner on May 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
88 lines (66 loc) · 2.2 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
# get symlinked script directory
SCRIPT_DIR="$(dirname "$(readlink "$HOME/.zshrc")")/zsh"
# LANG
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
# zsh config
bindkey -v # vi mode
setopt no_beep
setopt auto_cd
export HISTSIZE=10000
export SAVEHIST=10000
setopt append_history
setopt hist_ignore_all_dups
setopt hist_ignore_space
setopt share_history
source "$SCRIPT_DIR/exports.zsh"
# win title (starship)
function set_win_title() {
echo -ne "\033]0; $(basename "$PWD") \007"
}
precmd_functions+=(set_win_title)
# setup PATH
[ -f "/usr/libexec/path_helper" ] && eval `/usr/libexec/path_helper -s`
# init completions
zstyle ':completion:*' menu select
if type brew &>/dev/null; then
FPATH=$(brew --prefix)/share/zsh-completions:$FPATH
fi
autoload -Uz compinit
compinit
# iTerm
test -e "$HOME/.iterm2_shell_integration.zsh" && source "$HOME/.iterm2_shell_integration.zsh"
# plugin options
export SHOW_AWS_PROMPT=false
export NVM_LAZY_LOAD=true
# pyenv
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
# antibody
if ! [ -f "$SCRIPT_DIR/zsh_plugins.zsh" ]; then
source "$HOME/.zsh_plugins.sh"
else
echo "WARNING: $HOME/.zsh_plugins.sh not found - run antibody-update"
fi
source "$SCRIPT_DIR/key_bindings.zsh"
source "$SCRIPT_DIR/aliases.zsh"
source "$SCRIPT_DIR/utils.zsh"
# untested, staged shell configs
! [ -f "$SCRIPT_DIR/staged.zsh" ] || source "$SCRIPT_DIR/staged.zsh"
# starship
eval "$(starship init zsh)"
# start direnv
eval "$(direnv hook zsh)"
# nix
if [ -e "$HOME/.nix-profile/etc/profile.d/nix.sh" ]; then . "$HOME/.nix-profile/etc/profile.d/nix.sh"; fi
source "$(brew --prefix)/share/zsh-history-substring-search/zsh-history-substring-search.zsh"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
export PATH="/opt/homebrew/opt/qt@5/bin:$PATH"
export PATH="/opt/homebrew/opt/binutils/bin:$PATH"
source /Users/carlossless/.docker/init-zsh.sh || true # Added by Docker Desktop
if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
exec tmux
fi