Shell
Zsh structure + tools.
| File | Role |
|---|---|
rig/dots/zshrc | → ~/.zshrc |
rig/dots/p10k.zsh | → ~/.p10k.zsh |
rig/home/dot_zsh/aliases.zsh | → ~/.zsh/aliases.zsh (still sourced from zshrc) |
rig/home/dot_zsh/functions/ | autoload: freshen, sync-cursor, bak, tmpd, fkill |
checks/zsh-structure.sh | L0–L4 gate |
checks/zsh-structure-test.sh | fixture-TDD; part of just check-zsh |
| Knob | Value |
|---|---|
| OMZ plugins (exactly 12) | git gh macos vscode extract sudo docker brew aws terraform uv zsh-interactive-cd (dropped safe-paste, docker-compose) |
| History | HISTSIZE=60000 SAVEHIST=50000 + hist_reduce_blanks hist_find_no_dups hist_fcntl_lock (explicit zsh HISTFILE default) |
| pnpm completion | Generated by pnpm 11.9.0, tracked as rig/home/dot_zsh/completions/_pnpm, and loaded from ~/.zsh/completions before Oh My Zsh initializes completion |
| Atuin Ctrl-R | local-only, daemon-fuzzy, default host; atuin init zsh --disable-up-arrow --disable-ai; cycle host/session/directory/workspace/global |
| Runners | just = recipes; mise = versions (eval "$(mise activate zsh)" once); direnv = env + layout_uv (do not use mise); go-task is not a runner |
| fzf | CTRL-T (fd) / ALT-C; Ctrl-R disabled (FZF_CTRL_R_COMMAND=) |
fkill | Filters selections to unique decimal PIDs 2..2147483647, excludes the current shell, and preserves real kill errors |
| Highlight | ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets) last |
| Reminders | Homebrew zsh-you-should-use only, after aliases/local overrides and before highlighting (YSU_DISABLE=1 in ~/.zshrc.local to skip) |
| Catalog | #: line above each alias; als / alias-help lists name + description + expansion |
| OpenCode | opc CLI / opa app; never oc |
| Codex | cdx CLI / cda app (ChatGPT.app, cask chatgpt) |
| Grok Build | grk |
| Cursor | cur / curp IDE; agt CLI (agent) |
New high-signal aliases (full catalog is als):
| Alias | Does |
|---|---|
opc | opencode (CLI) |
opa | open -a OpenCode |
ocr | opencode run |
occ | opencode --continue |
cdx | codex (CLI) |
cda | open -a ChatGPT (Codex app) |
grk | grok (Grok Build) |
cur | cursor (IDE) |
curp | cursor . |
agt | agent (Cursor CLI) |
bi | brew install |
bup | brew upgrade (not defined if a bup binary exists) |
fr | freshen |
frn | freshen --dry-run --progress=plain --no-color |
frc | freshen --clean-only --progress=plain --no-color |
frs | freshen --storage-plan |
gtyv | ghostty +validate-config |
gtyc | ghostty +show-config --changes-only |
bench | hyperfine --warmup 3 |
jcp | jc -p |
mtrc | mtr --report --report-cycles 20 (macOS: sudo mtrc) |
atuin-agents | atuin search --author '$all-agent' |
als | list tracked aliases with descriptions |
Markdown jq: mq '.h' lists headings; Glow stays the yazi Markdown preview. Structural search: sg / ast-grep (global ~/sgconfig.yml; not a second secrets scanner). DuckDB is SQL (~/.duckdbrc); VisiData is the interactive sheet (vd); yazi preview for csv/parquet stays DuckDB. du/df remain dust/duf.
Pipelines (keep curl in scripts; do not alias http/hf/oc):
xh :8080/health
ls -l | jcp | jq '.[].size'
vd data.csv # yazi: g then v
lnav app.log
sudo mtr example.com
usql sqlite:./dev.dbjust check-zsh
just check-zsh-smoke # local only
just zsh-alias-usage # local HISTFILE tokens → local/zsh-alias-usage.txtjust check-zsh runs zsh -n (when zsh exists), cmp of dots ↔ Chezmoi parity mirrors, checks/zsh-structure-test.sh, checks/zsh-structure.sh rig/dots/zshrc all, plus Atuin init and zsh-home-behavior-test.sh.
| Behavior | Live rule |
|---|---|
timeout alias | Guarded: command -v gtimeout && alias timeout='gtimeout' in ~/.zsh/aliases.zsh. Unguarded alias timeout= in zshrc fails L0. |
| nvm | Sourced if $NVM_DIR/nvm.sh exists (Linux bootstrap). |
| mise | mise activate zsh when mise is on PATH (wins if both nvm and mise exist). |
| Linux OMZ plugins | linux.sh clones p10k, zsh-autosuggestions, and zsh-syntax-highlighting under $ZSH_CUSTOM. zshrc prefers Homebrew shares, then that custom path. macOS bootstrap does not clone the brew-managed plugins. |
| Atuin | After first install, bootstrap imports zsh history only when $XDG_DATA_HOME/atuin/history.db is missing (atuin import zsh). Do not run that on every apply. |
Structure rules + fixtures: checks/fixtures/zshrc/. Rollback: checks/zsh-rollback-live.sh. freshen · Home · Brew.