π ZSHAND Private Functions ReferenceΒΆ
π Internal helper functions used by framework components (widgets, hooks, build system). Not intended for direct user invocation.
π Function ReferenceΒΆ
| File | Function | Used By | Purpose |
|---|---|---|---|
_zshand_network_monitor.zsh | _zshand_network_monitor | Hooks, widgets | Monitor network connectivity changes |
_get_project_context.zsh | _get_project_context | aicmit, aidebug | Detect project type and context for AI tools |
π Naming ConventionΒΆ
| Prefix | Scope | Example |
|---|---|---|
_zshand_ | Framework-wide internal | _zshand_network_monitor |
_ | Single-component internal | _get_project_context |
Private functions are auto-loaded but not exported. They exist in the function namespace but are not documented in zhelp or zwidgets.
βοΈ Adding a Private FunctionΒΆ
# private_functions/_zshand_my_helper.zsh
_zshand_my_helper() {
local input="$1"
# Internal implementation
echo "$input"
}
Use private functions when:
- Logic is shared across multiple widgets or hooks
- The function shouldn't appear in user-facing
zhelpoutput - The function needs framework internals not available to user scripts
π Related DocumentsΒΆ
| Document | Purpose |
|---|---|
| π private_functions/README.md | In-tree quick reference |
| π¨ STYLE_GUIDE.md | Naming conventions |
| β¨οΈ WIDGETS.md | Widgets that consume private functions |