Skip to content
Rui edited this page Nov 3, 2026 · 2 revisions

Shell

zsh with Oh My Zsh and Powerlevel10k. Reference: .config/zsh/README.md.

The Oh My Zsh plugins from custom/plugins are cloned at pinned commits by the playbook: zsh-autosuggestions (it also suggests from completions), fzf-tab, and zsh-syntax-highlighting, which must stay last. Oh My Zsh only notes its updates at startup; omz update when you want.

Where things go

  • ~/.zshrc is overwritten on every sync. Never edit it on the machine.
  • ~/.zshrc.local is sourced last and never committed: anything for one machine (work tools, aliases, export BW_USER=<email>, export DOTFILES_DIR=...).
  • Shared functions are one file per tool in .config/zsh/, with no secrets and no machine-specific names.

The shared commands

Command
dotfiles-sync, dotfiles-diff [-p] update this machine from the repo, or see what that would change (Installing and updating)
local-backup, local-restore [machine] the per-machine files to and from Bitwarden
bw, secret T [item] Bitwarden without retyping the master password; a token for one command (Secrets)
sops-on [60m], sops-off, sops-status, sops-save, sops-login [on|off] the SOPS age keys for a limited time (Secrets)
kubectl, k, helm, k9s, sofka guarded on production (Kubernetes)
ktx, kns kubectx / kubens: ktx -s <ctx> gives the shell a context of its own, kns with no argument picks with fzf
ws open or create a VS Code workspace (Editors)
logcli Loki's logs, port-forwarding to LOKI_SERVICE (default monitoring/loki) when LOKI_ADDR is unset
plugins-outdated the pinned zsh / tmux plugins that master moved past (a notification every 14 days too)

Aliases: vim is nvim, cat is bat, lz lazygit, lzd lazydocker, cd is zoxide (cd dotfiles from anywhere, cdi to pick; z kept for the habit).

Day to day

  • Tab completes in an fzf list (fzf-tab), hidden files included
  • Ctrl+T picks a file, Ctrl+G a folder, Ctrl+R a history entry, with previews (Ctrl+G, not Alt+C: Option belongs to AeroSpace)
  • ↑ and Ctrl+R see what other panes and sessions ran since this one's last prompt
  • Esc Esc puts sudo in front, Ctrl+O copies the line, copypath [file], extract FILE, ofd / cdf (Finder), quick-look FILE
  • History: 100 000 entries shared between panes, with start time and duration (history -i), duplicates kept once, !! / !$ expanded onto the line before it runs, a leading space keeps a command out, and a line that looks like it holds a token is never saved
  • fzf lists with fd (hidden files in, .gitignore respected) and previews with bat / ls
  • ~/.krew/bin is on the PATH (kubectl neat, tree, view-secret, who-can), with their Tab completion from .config/kubectl/complete/
  • EDITOR is nvim (git commit, kubectl edit, lazygit and k9s e)

Startup time

About 0.1–0.15 s: nvm loads on first use, pyenv init skips the rehash (run pyenv rehash after installing a package with commands), and the pyenv / zoxide / fzf inits and completions are cached in ~/.cache/zsh, regenerated when the tool changes. Measure with time zsh -i -c exit; delete ~/.cache/zsh to force a refresh.

Clone this wiki locally