#!/usr/bin/env bash

# shellcheck shell=bash

# ``````````````````````````````````````````````````````````````````````````````
# Function name: cli_help()
#
# Description:
#   Show help in cli.
#
# Usage:
#   cli_help
#
# Examples:
#   cli_help
#

function cli_help() {

  # shellcheck disable=SC2034
  local _FUNCTION_ID="cli_help"
  local _STATE=0

  printf "%s" "
  Main Commands
  -------------

    help    <module>                show cli help or module help
    list                            show available modules
    show    <module [key]>          show info about modules and profiles
    config  <key>|<module [key]>    show global or module configuration
    set     <key>|<module [key]>    set global or module variable value
    use     <module>                use module (changed env)
    pushd   init|show|flush         command line commands stack
    search  <key>                   search key in all commands

    reload  <modules|config>        reload all modules cache or configuration
    banner                          show banner

    nmap    <nmap_params>           pure nmap engine

    Options:

      <module>                      module name
      <key>                         key value

  Module Commands
  ---------------

    help    <module>                display module or NSE help
    show    <key>                   display module or profile info
    config  <key>                   show module configuration
    set     <key>                   set module variable value
    use     <module>                reuse module (changed env)
    pushd   <key>|init|show|flush   command line commands stack (experimental)
    search  <key>                   search key in all commands
    init    <alias|id> [--args]     run profile

  Examples
  --------

    show sample                     show 'sample' module info
    config terminal                 show 'terminal' key value
    use sample                      use 'sample' module
    search http                     search 'http' in all commands

"

  return $_STATE

}
