These are the cross-cutting rules most likely to surprise a new user:
- The install path is fixed.
init.zshloads$HOME/.config/zsh/*.zsh. A clone elsewhere needs a symlink or a deliberate code change. Runzdoctorto confirm the location and catch silently skipped modules. - Source order matters. Source this layer after frameworks when its aliases should win.
~/.zshrcitself is not versioned here. - File operations keep native semantics.
mkdir,cp,mv, andrmare not redefined. Add flags deliberately and keep real backups; shell prompts are not a backup strategy. - Interactive flags are situational. If you opt into
-i, remember that later flags such as-fcan override it. Review the final command line before destructive operations. - Ordinary globs exclude dotfiles. Use
*(D)only when hidden entries are intentional. In contrast,ffanddusageexplicitly include hidden entries by design. - Leading-space history is convenience, not secret storage.
HIST_IGNORE_SPACEreduces accidental persistence but does not protect process arguments, logs, terminal capture, or already-shared history. - Global aliases are opt-in and expand anywhere. They stay undefined unless
ZSH_GLOBAL_ALIASES=1is exported before startup. Once enabled, unquoted tokens such asGorNULcan change a command far from its first word. Quote literal occurrences. - An empty PATH component means the current directory.
pathpreserves and exposes it because silently normalizing PATH would change command lookup. - Completion needs compinit. Without
compdef, command-specific completion quietly does nothing. Runzdoctorto confirm readiness. - fzf is all-or-nothing at 0.68.0+. An unsupported build blocks fuzzy workflows instead of enabling a reduced theme or partial bindings. Plain
zhelpremains available. - Theme choice is machine-local.
ztheme usechanges only the current shell, andztheme exportprints settings without editing.zshrc. This repository does not theme the prompt, terminal, tmux, editor,bat, Git, orLS_COLORS. - Ctrl+R does not execute the selection. It inserts history into the command buffer for review and editing.
fkilldefaults to SIGTERM.fkill 9is a force-kill and should be the exception.- CGM is startup-optional. Installing
secret-toolmid-session does not definecgmuntil the module is sourced again or the shell restarts. - CGM changes only the current shell. Run
env,unset, anddeletedirectly, not through a pipe, command substitution, or subshell. Deletion cannot revoke values inherited by existing processes. - Package previews can write caches. Default checks, search, plan, and cleanup previews avoid package installation/removal but may use network access or write manager metadata. Upgrade and cleanup mutate package or cache state; preview cleanup with
clean --dry-run. --sudoauthorizes but does not auto-confirm. Native package-manager and polkit prompts remain authoritative.- Inventories have limits. APT and Paru repository queries use cached metadata; Pacman refreshes a separate database when
checkupdatesis available, and DNF may refresh expired metadata. Native upgrades resolve transactions.npkgreports output identity rather than version ordering. - Partial package results fail.
upkgcontinues other managers but returns nonzero for partial, failed, or blocked selected backends.npkgreturns nonzero when any row is unknown. - Rich output is presentation. Use a pipe, redirect,
NO_COLOR, or an explicit plain option for stable machine-readable text. - The target platform is GNU/Linux.
ss, GNU flags, sysfs profile paths, and severalfind/duflows are Linux-oriented. - Network helpers contact external services.
weatherrequestswttr.in,myiprequestsifconfig.me, andheaderscontacts the URL supplied by the user. - Automation must load the layer explicitly. Aliases and functions are interactive shell features; scripts should call real binaries or source
init.zshinside Zsh. - Helper failures stay on stderr. Successful data remains pipeable on stdout; usage errors, missing dependencies, and invalid paths do not contaminate command substitutions.
- Leading-dash inputs are data. File helpers normalize archive paths, directory helpers terminate options, and package search backends separate wrapper flags from query terms.