split zsh in config modules

This commit is contained in:
2025-09-15 07:05:06 +02:00
parent 5fa4c6df2a
commit d7b5423c80
5 changed files with 124 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
# -----------------------------
# PATH
# -----------------------------
export PATH="$PATH:$HOME/bin"
# -----------------------------
# Locales
# -----------------------------
export LANGUAGE="en_US:en"
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
# -----------------------------
# Autocomplete
# -----------------------------
autoload -Uz compinit && compinit
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case insensitive
# -----------------------------
# Shell options
# -----------------------------
setopt autocd
setopt share_history
setopt interactivecomments
setopt PROMPT_SUBST # Enable dynamic prompt expansion
# -----------------------------
# Disable conflicting builtins
# -----------------------------
disable log
# -----------------------------
# History
# -----------------------------
HISTFILE=${ZDOTDIR:-$HOME}/.zsh_history
HISTSIZE=2000
SAVEHIST=1000
setopt HIST_IGNORE_ALL_DUPS
# -----------------------------
# Source modular components
# -----------------------------
CONFIG_DIR="$HOME/.config/zsh"
[ -f "$CONFIG_DIR/aliases" ] && source "$CONFIG_DIR/aliases"
[ -f "$CONFIG_DIR/prompt" ] && source "$CONFIG_DIR/prompt"
[ -f "$CONFIG_DIR/keybindings" ] && source "$CONFIG_DIR/keybindings"