Curated Toolkit Port — Plan 3 (executed inline)#
Goal: Port the mature ~5,600-line config into the modular layout: theme, animations, the full pentest toolkit (lazy), aliases, functions — old files preserved as backup, nothing deleted from $HOME.
Decisions (from brainstorming): non-invasive precmd target banner (no starship.toml edits); full curated port.
Built#
config/theme.zsh— starship init + transience +_pentest_target_banner(precmd, reads~/.pentest/.active).config/animations.zsh—cross/crossmode(wrap existingcrossfetch),verse,_git_welcome; TTY-guarded splash (-t 1) so it never blocks tests/scripts.config/pentest-tools.zsh— verbatim port of~/.pentest.zsh(3374 lines) + rustscan/rs*section of~/.zshrc+~/.pentest-mac.zsh(repointed source). Stripped the 6 DB-superseded funcs: note/flag/flag-count/flags/creds/creds-show.config/pentest-cmds.zsh— GENERATED set of 204 toolkit command names (scripts/gen-pentest-cmds.sh).config/pentesting.zsh— lazy loader: thin wrapper per toolkit command; first call loads the toolkit (overwrites wrappers) then dispatches. Wrappers are real functions → correct under redirection/pipes (acommand_not_found_handleris NOT — zsh forks it when the missing command is redirected).config/aliases.zsh— eza listing family + nav + maintenance + date + all other top-level aliases (131; hash aliases live with their fns).config/functions.zsh— git date helpers + full hash toolkit (337–1051) + gcommit + update-all + yazi/lazygit/palette + cheat + OMZ-builtin reimplementations (extract/x, copypath, copyfile, web_search+google/ddg/bing, colored-man-pages, dirhistory Alt-arrows, sudo-ESC, mkcd,_clipcross-platform).config/core.zsh— added zoxide init; atuin--disable-up-arrow.
Key fixes during build#
${1//\'/\'\'}took the replacement literally → SQL escape was broken (injection test caught it); fixed via vars.- Inherited
PENTEST_LOADED=1tripped the toolkit self-guard →unsetin loader. - Re-entrant recursion / subshell-forked handler → switched to pre-installed wrappers + set loaded-flag-first.
Verification#
Suite: 64/64 passing. Boot median ~185ms (vs OMZ ~1350ms). Clean interactive boot (only a benign non-TTY zle eval notice). Old ~/.zshrc/~/.pentest*.zsh untouched.
Deferred to Plan 4#
.tmux.conf, full setup.sh (already has --link/--revert/--check; add deps install), update.sh, docs (CHEATSHEET/PENTESTING/DATABASE/TMUX/README expansion).