-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc##os.Linux
73 lines (53 loc) · 1.84 KB
/
.zshrc##os.Linux
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
# Enable Powerlevel10k instant prompt. Keep this close to the top of ~/.zshrc.
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
# Set PATH for custom binaries and scripts
export PATH="$HOME/.local/bin:$HOME/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
# Oh My Zsh configuration
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="powerlevel10k/powerlevel10k" # Use Powerlevel10k theme
[[ -f ~/.zsh/p10k.zsh ]] && source ~/.zsh/p10k.zsh # look for the correct config file.
# Load Oh My Zsh
source $ZSH/oh-my-zsh.sh
# Plugins
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
# Enable zsh-autosuggestions
# source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh
# Enable zsh-syntax-highlighting
# source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# Load Powerlevel10k configuration
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# Load modular configurations
if [ -r "$HOME/.zsh/env.zsh" ]; then
source "$HOME/.zsh/env.zsh"
fi
if [ -r "$HOME/.zsh/exports.zsh" ]; then
source "$HOME/.zsh/exports.zsh"
fi
if [ -r "$HOME/.zsh/aliases.zsh" ]; then
source "$HOME/.zsh/aliases.zsh"
fi
if [ -r "$HOME/.zsh/functions.zsh" ]; then
source "$HOME/.zsh/functions.zsh"
fi
if [ -r "$HOME/.zsh/platform.zsh" ]; then
source "$HOME/.zsh/platform.zsh"
fi
# ZSH options and history settings
export HISTFILE="$HOME/.zsh_history"
export HISTSIZE=10000
export SAVEHIST=10000
setopt HIST_IGNORE_DUPS HIST_IGNORE_SPACE
# Default editor
export EDITOR="nvim"
# Interactive shell customizations
if [[ $- == *i* ]]; then
bindkey "^R" history-incremental-search-backward
fi
# pipx completions
autoload -U bashcompinit
bashcompinit
eval "$(register-python-argcomplete pipx)"
# direnv
eval "$(direnv hook zsh)"