-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
137 lines (106 loc) · 4.07 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
133
134
135
136
137
# 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
GITSTATUS_LOG_LEVEL=DEBUG
# Correct spelling for commands
setopt correct
# turn off the infernal correctall for filenames
unsetopt correctall
# history tweaking
setopt append_history
setopt extended_history
setopt hist_expire_dups_first
setopt hist_ignore_all_dups
setopt hist_ignore_dups
setopt hist_ignore_space
setopt hist_reduce_blanks
setopt hist_save_no_dups
setopt hist_verify
setopt INC_APPEND_HISTORY
unsetopt HIST_BEEP
HISTORY_IGNORE="(cd ..|l[s]#( *)#|pwd *|exit *|date *|* --help)"
# Share your history across all your terminal windows
setopt share_history
HISTSIZE=100000
SAVEHIST=100000
HISTFILE=~/.zsh_history
export EDITOR=micro
# bun
export BUN_INSTALL="$HOME/.bun"
[ -s "$BUN_INSTALL/_bun" ] && source "$BUN_INSTALL/_bun"
export ANDROID_HOME=$HOME/Android/Sdk
path=('$HOME/.rye/shims' $path)
path+=("$HOME/Scripts")
path+=("$HOME/.local/bin")
path+=("$HOME/.cargo/bin")
path+=("$HOME/.config/composer/vendor/bin/")
path+=("$BUN_INSTALL/bin")
path+=("$ANDROID_HOME/emulator")
path+=("$ANDROID_HOME/platform-tools")
export PATH
# Add some completions settings
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case insensitive tab completion
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" # Colored completion (different colors for dirs/files/etc)
zstyle ':completion:*' menu select
zstyle ':completion:*' rehash true # automatically find new executables in path
# Speed up completions
zstyle ':completion:*' accept-exact '*(N)'
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path ~/.zsh/cache
zstyle ':omz:plugins:nvm' autoload yes
setopt ALWAYS_TO_END # Move cursor to the end of a completed word.
setopt AUTO_LIST # Automatically list choices on ambiguous completion.
setopt AUTO_MENU # Show completion menu on a successive tab press.
setopt AUTO_PARAM_SLASH # If completed parameter is a directory, add a trailing slash.
setopt COMPLETE_IN_WORD # Complete from both ends of a word.
# Invalidate config on .zshrc change
ZGEN_RESET_ON_CHANGE=(${HOME}/.zshrc)
# oh-my-zsh/bgnotify options
bgnotify_threshold=2
if [ ! -d "${HOME}/.zgenom" ]
then
git clone https://github.com/jandamm/zgenom.git "${HOME}/.zgenom"
fi
source "${HOME}/.zgenom/zgenom.zsh"
zgenom autoupdate 1
if ! zgenom saved; then
echo "Creating a zgenom save"
zgenom oh-my-zsh
zgenom oh-my-zsh plugins/aws
zgenom oh-my-zsh plugins/bgnotify
zgenom oh-my-zsh plugins/sudo
zgenom oh-my-zsh plugins/colored-man-pages
zgenom oh-my-zsh plugins/systemd
zgenom oh-my-zsh plugins/nvm
zgenom loadall <<EOPLUGINS
zdharma-continuum/fast-syntax-highlighting
zsh-users/zsh-history-substring-search
unixorn/autoupdate-zgenom
unixorn/warhol.plugin.zsh
djui/alias-tips
unixorn/fzf-zsh-plugin
chrissicool/zsh-256color
zsh-users/zsh-completions src
srijanshetty/docker-zsh
RobSis/zsh-completion-generator
zsh-users/zsh-autosuggestions
supercrabtree/k
romkatv/powerlevel10k powerlevel10k
EOPLUGINS
zgenom save
fi
# zsh-users/zsh-autosuggestions options
export ZSH_AUTOSUGGEST_STRATEGY=(history completion)
bindkey '^ ' autosuggest-accept
# bun completions
[ -s "/home/matthieu/.bun/_bun" ] && source "/home/matthieu/.bun/_bun"
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
[[ ! -f "~/.rye/env" ]] || source "~/.rye/env"
alias ls="eza -l -a --icons -F --hyperlink"
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