-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
132 lines (110 loc) · 3.02 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load
ZSH_THEME="spaceship"
# Disable compfix to avoid the mv error
ZSH_DISABLE_COMPFIX=true
# Which plugins would you like to load?
plugins=(
git
history
last-working-dir
npm
zsh-completions
colored-man-pages
web-search
zsh-history-substring-search
command-not-found
common-aliases
fzf
zsh-syntax-highlighting
zsh-autosuggestions
)
# Initialize zoxide (a better alternative to z)
eval "$(zoxide init zsh)"
# Source Oh My Zsh
source $ZSH/oh-my-zsh.sh
# History configuration
HISTFILE="$HOME/.zsh_history"
HISTSIZE=1000000
SAVEHIST=1000000
setopt extended_history
setopt inc_append_history
setopt hist_ignore_space
# Source custom configurations
[ -f ~/.bashrc_shared ] && source ~/.bashrc_shared
[ -f ~/.bash_aliases ] && source ~/.bash_aliases
[ -f ~/.local_aliases ] && source ~/.local_aliases
# PATH additions
[ -f /Applications/Docker.app/Contents/Resources/bin/docker ] && export PATH="$PATH:/Applications/Docker.app/Contents/Resources/bin"
[ -f /Applications/Rancher\ Desktop.app/Contents/Info.plist ] && export PATH="$PATH:$HOME/.rd/bin"
[ -d ~/.local/bin ] && export PATH="$PATH:~/.local/bin"
export PATH="$PATH:~/.dotnet/tools"
# Neovim setup
if [ -f /usr/bin/nvim ]; then
alias vim="nvim"
export EDITOR=nvim
export NVIM_TUI_ENABLE_TRUE_COLOR=1
fi
# Python version manager
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init --path)"
eval "$(pyenv init -)"
# Other environment variables
export DOTNET_ROOT=/opt/dotnet
export AWS_VAULT_BACKEND="file"
export BROWSER=/usr/bin/chromium
# NVM setup
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
# FZF configuration
export FZF_DEFAULT_COMMAND='rg --files'
export FZF_DEFAULT_OPTS='--height 60% --layout=reverse --border sharp'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
# Source FZF
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# Kubectl completion
(( $+commands[kubectl] )) && source <(kubectl completion zsh)
# Angular CLI completion
(( $+commands[ng] )) && source <(ng completion script)
# Terraform completion
complete -o nospace -C /usr/bin/terraform terraform
# Initialize the completion system
autoload -Uz compinit && compinit
zstyle ':completion:*' menu select
# Spaceship prompt configurations
SPACESHIP_PROMPT_ORDER=(
time
user
dir
host
git
node
ruby
python
golang
docker
aws
exec_time
line_sep
jobs
exit_code
char
)
SPACESHIP_PROMPT_ADD_NEWLINE=false
SPACESHIP_TIME_SHOW=true
SPACESHIP_TIME_FORMAT="%D{%I:%M:%S %p}"
SPACESHIP_EXEC_TIME_SHOW=true
SPACESHIP_EXEC_TIME_ELAPSED=0
# Ensure Spaceship is loaded
autoload -U promptinit; promptinit
prompt spaceship
# Override Spaceship char section
SPACESHIP_CHAR_PREFIX=" "
SPACESHIP_CHAR_SUFFIX=""
SPACESHIP_CHAR_SYMBOL="❯"
### MANAGED BY RANCHER DESKTOP START (DO NOT EDIT)
export PATH="/Users/rc/.rd/bin:$PATH"
### MANAGED BY RANCHER DESKTOP END (DO NOT EDIT)