Hello, olets. (Sorry for the late reply.)

On one machine, I used compinstall and zsh-newuser-install, then added some minor things from that. Here it is in sections:


compinstall is mostly responsible for these lines:

zstyle ':completion:*' auto-description '— %d'
zstyle ':completion:*' completer _expand _complete _ignored _match _correct _approximate _prefix
zstyle ':completion:*' format '» %B%d%b (%B%F{cyan}%n%f%b)'
zstyle ':completion:*' group-name ''
zstyle ':completion:*' insert-unambiguous true
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-prompt '%SAt %p: Hit TAB for more, or the character to insert%s'
zstyle ':completion:*' max-errors 2 numeric
zstyle ':completion:*' original true
zstyle :compinstall filename '/home/user/.zshrc'

autoload -Uz compinit
#compinit # commented out to use cache

zsh-newuser-install is responsible for these:

HISTFILE=~/.histfile
HISTSIZE=100000
SAVEHIST=100000
setopt appendhistory autocd extendedglob
bindkey -v

I added the rest. These are things I think should be added to compinstall:

compinit -d $HOME/.cache/zcompdump
# Dynamic list-colors (Linux)
eval $(TERM=xterm dircolors -b)
zstyle -e ':completion:*' list-colors 'reply=(${(s.:.)LS_COLORS})'
# Test in order: no change, smart case, ignore case, suffix, prefix
zstyle ':completion:*' matcher-list '' 'm:{a-z}={A-Z}' '+m:{a-zA-Z}={A-Za-z}' '+r:|[._-]=* r:|=* l:|=*'
# always use menu
zstyle ':completion:*' menu yes select
# enable caching
zstyle ':completion:*' use-cache yes
zstyle ':completion:*' cache-path $HOME/.cache/zcompcache

And I think there should be a way for zsh-newuser-install to add:

setopt autopushd globstarshort noclobber correct

Finally, some personal preferences, take from this what you will:

setopt warncreateglobal rcquotes rcexpandparam cbases octalzeroes
setopt histverify histignoredups histignorespace sharehistory incappendhistory

zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'

aliases=()
alias ls='ls --color=auto'
alias ip='ip -color=auto'
alias {v,:e}=nvim g=git _=sudo _e=sudoedit
alias l='ls --color=auto -lhF'

autoload -Uz zargs zed zcalc zmathfunc zsh-mime-setup run-help

bindkey '^?' backward-delete-char '^h' backward-delete-char
bindkey 'Y' vi-yank-eol

zsh history

# History in cache directory
# History
HISTSIZE=5000
HISTFILE=~/.cache/zsh/history
SAVEHIST=$HISTSIZE
HISTDUP=erase
setopt appendhistory
setopt sharehistory
setopt hist_ignore_space
setopt hist_ignore_all_dups
setopt hist_save_no_dups
setopt hist_ignore_dups
setopt hist_find_no_dups

Use eza instead of ls.

## eza
alias ls="eza --icons --group-directories-first"
alias ld="eza -D --icons=always --color=always"
alias lf="eza -f --icons=always --color=always --git-ignore"
alias ll="eza --icons --group-directories-first -l -b --total-size -g -h"
alias la='eza -a --color=always --group-directories-first'
alias lt='eza -aT -L 2 --color=always --group-directories-first'
alias l.='eza -a | grep -E "^\."'