
#!/usr/bin/env nu 

# myscript.nu
export def usage [provider: string, infra: string] {
   let info = if ( $env.CURRENT_FILE? | into string ) != "" { (^grep "^# Info:" $env.CURRENT_FILE ) | str replace "# Info: " "" } else { "" }
#  $(declare -F _usage_options >/dev/null && _usage_options)
   $"
USAGE provisioning ($provider) -k cloud-path  file-settings.yaml  provider-options 
DESCRIPTION
   UPCLOUD ($info)
OPTIONS
  -s server-hostname
    with server-hostname target selection
  -p provider-name
    use provider name 
    do not need if 'current directory path basename' is not one of providers available
  -new | new [provisioning-name]
    create a new provisioning-directory-name by a copy of ($infra)
  -k cloud-path-item
    use cloud-path-item as base directory for settings 
  -x
    Trace script with 'set -x'
  providerslist | providers-list | providers list
    Get available providers list
  taskslist | tasks-list | tasks list
    Get available tasks list
  serviceslist | service-list
    Get available services list
 tools
    Run core/on-tools info  
  -i
    About this 
  -v
    Print version
  -h, --help
    Print this help and exit.
  PROV: ($env.WK_CNPROV)
"
#  ["hello" $name $title]
}

