Skip to content

πŸ” 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 zhelp output
  • The function needs framework internals not available to user scripts

Document Purpose
πŸ“‚ private_functions/README.md In-tree quick reference
🎨 STYLE_GUIDE.md Naming conventions
⌨️ WIDGETS.md Widgets that consume private functions