59 lines
2.8 KiB
Bash
59 lines
2.8 KiB
Bash
# ~/.zshrc shim (managed by bootstrap) sources this file via ZDOTDIR.
|
|
# Edit freely; re-run the shell-zsh step to re-sync from the repo if needed.
|
|
|
|
# ── oh-my-zsh bootstrap ────────────────────────────────────────────────────
|
|
export ZSH="${ZSH:-$HOME/.oh-my-zsh}"
|
|
export ZSH_CUSTOM="${ZSH_CUSTOM:-$ZSH/custom}"
|
|
|
|
# theme disabled — we use starship (init at the bottom)
|
|
ZSH_THEME=""
|
|
|
|
# casewise history
|
|
HISTFILE="$HOME/.local/state/zsh/history"
|
|
HISTSIZE=100000
|
|
SAVEHIST=100000
|
|
setopt EXTENDED_HISTORY SHARE_HISTORY HIST_IGNORE_DUPS HIST_IGNORE_SPACE HIST_VERIFY
|
|
setopt AUTO_CD PUSHD_IGNORE_DUPS PROMPT_SUBST
|
|
setopt INTERACTIVE_COMMENTS
|
|
|
|
# load the modular pieces (order matters)
|
|
[[ -f "$ZDOTDIR/path.zsh" ]] && source "$ZDOTDIR/path.zsh"
|
|
[[ -f "$ZDOTDIR/aliases.zsh" ]] && source "$ZDOTDIR/aliases.zsh"
|
|
[[ -f "$ZDOTDIR/aliases-extras.zsh" ]] && source "$ZDOTDIR/aliases-extras.zsh"
|
|
[[ -f "$ZDOTDIR/functions.zsh" ]] && source "$ZDOTDIR/functions.zsh"
|
|
|
|
# ── completion styling (set before omz runs compinit) ───────────────
|
|
autoload -Uz compinit
|
|
zstyle ':completion:*' menu select
|
|
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
|
|
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
|
|
|
|
# oh-my-zsh + plugins (omz runs compinit internally; lists our plugins)
|
|
[[ -f "$ZDOTDIR/plugins.zsh" ]] && source "$ZDOTDIR/plugins.zsh"
|
|
|
|
# ── standard zsh niceties ─────────────────────────────────────────────
|
|
autoload -U edit-command-line
|
|
zle -N edit-command-line
|
|
bindkey '^X^E' edit-command-line
|
|
|
|
|
|
# ... -> ../.. expansion (ported from fish)
|
|
rationalise-dot() {
|
|
if [[ $LBUFFER = *.. ]]; then LBUFFER+=/; else LBUFFER+=.; fi
|
|
}
|
|
zle -N rationalise-dot
|
|
bindkey . rationalise-dot
|
|
|
|
# ── keychain (commented) — fill in the key labels you use on this box ────
|
|
# if command -v keychain >/dev/null 2>&1; then
|
|
# keychain --quiet --nogui id_ed25519 # <- your server-relevant key(s) here
|
|
# [[ -f "$HOME/.keychain/$(hostname)-sh" ]] && source "$HOME/.keychain/$(hostname)-sh"
|
|
# fi
|
|
|
|
# ── integrations ────────────────────────────────────────────────────────────
|
|
command -v zoxide >/dev/null 2>&1 && eval "$(zoxide init zsh)"
|
|
command -v fzf >/dev/null 2>&1 && [[ -f "$HOME/.fzf.zsh" ]] && source "$HOME/.fzf.zsh"
|
|
# ── starship prompt ─────────────────────────────────────────────────────────
|
|
if command -v starship >/dev/null 2>&1; then
|
|
eval "$(starship init zsh)"
|
|
fi |