prvng_core/nulib/lib_provisioning/utils/help.nu
Jesús Pérez 316622a78f
merge(refactor/lazy-loading): ADR-025 lazy-loading complete
557 files merged. Conflicts resolved:
  - CHANGELOG.md: took refactor/lazy-loading (session changelog)
  - versions.ncl: took refactor/lazy-loading (adds typedialog entries)
2026-04-17 23:09:56 +01:00

25 lines
710 B
Text

# config/accessor star-import was dead — dropped (ADR-025 Phase 3 Layer 2).
export def parse_help_command [
source: string
name?: string
--task: closure
--ismod
--end
] {
#use utils/interface.nu end_run
let args = ($env.PROVISIONING_ARGS? | default "")
let has_help = if ($args | str contains "help") or ($args |str ends-with " h") {
true
} else if $name != null and $name == "help" or $name == "h" {
true
} else { false }
if not $has_help { return }
let mod_str = if $ismod { "-mod" } else { "" }
^(get-provisioning-name) $mod_str ...($source | split row " ") --help
if $task != null { do $task }
if $end {
if not (is-debug-enabled) { end_run "" }
exit
}
}