functions reference utilities π οΈ ZSHAND Functions Reference π Reusable utility functions loaded at startup. Available in every terminal session. Each function file includes a documentation header with USAGE, DEPENDENCIES, EXAMPLES, and SEE ALSO.
π€οΈ Path Functions Function Usage Purpose add_path add_path ~/bin Safely add to PATH (-a append, -r recursive) zpath zpath Audit PATH, fpath, manpath pathfix pathfix Audit and repair PATH (missing dirs, duplicates)
π Git Functions Function Usage Purpose tossh tossh [dir] Convert GitHub HTTPS remotes to SSH gundo gundo Git undo menu (unstage, soft reset, squash, hard reset) gitprune gitprune Delete merged local branches _gitid (chpwd hook) Auto Git identity from project .env
π₯οΈ System Functions Function Usage Purpose health health Environment health check (cache, runtimes, Atuin, SSH, clipboard, disk) pkgsync pkgsync Verify package sync (core + optional, MCHOSE bins, clipboard) zports zports [term] Active network listeners (lsof) ztop ztop Workstation dashboard (uptime, Git, cache, zpulse) extract extract <file> Universal archive extraction (optional delete source) zopt zopt [pattern] List Zsh options (optional filter) tog tog <option> Toggle Zsh option on/off (e.g. tog autocd)
π§ Helper Functions Function Usage Purpose dcopy dcopy Copy CWD path to clipboard fcopy fcopy <file> Copy file contents to clipboard zbak zbak <file> Timestamped backup to .backups fnew fnew <name> Create function stub and open in editor google google "query" Open Google search in browser jfmt jfmt [file] Pretty-print JSON (file or stdin) seek seek "pattern" Search zshand files (ripgrep)
π Logging Functions Function Usage Purpose zlog zlog [cmd] View session log (summary, -t, -list, -clean, failed, search) logstat logstat 30-day log statistics (commands, success rate, top commands) bootlog bootlog [view\|tail\|clear\|path] Shell init log viewer
π Reference Functions Function Usage Purpose zhelp zhelp Master command reference zwidgets zwidgets Keyboard map (widget bindings)
βοΈ Adding Custom Functions Create ~/.config/zshand/functions/my_func.zsh: # ββ my_func β Short description ββββββββββββββββββββββββββββββββββββββββββββββ
#
# USAGE:
# my_func [args]
#
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
my_func() {
local arg = " ${ 1 :- default } "
echo "Processing: $arg "
}
Rebuild: zr Use it: my_func value π Naming Conventions No prefix β user-facing functions (dcopy, health, seek) z prefix β framework-related (zpath, zlog, zopt, ztop) _ prefix β internal/hook-only (_gitid, _zlog_viewer) .zsh extension β sourced at startup, no shebang needed π Override Behavior User functions with the same basename replace framework functions:
~/.config/zshand/functions/seek.zsh β replaces $ZSHAND/functions/seek.zsh
~/.config/zshand/functions/my_new.zsh β added alongside framework functions
February 8, 2026 February 6, 2026