<commit_before>proc demo(alpha=1, beta=2.0, verb=false, item="", files: seq[string]) =
  ## demo entry point with varied, meaningless parameters.
  echo "alpha:", alpha, " beta:", beta, " verb:", verb, " item:", repr(item)
  for i, f in files: echo "args[", i, "]: ", repr(f)

proc show(gamma=1, iota=2.0, verb=false, paths: seq[string]): int =
  ## show entry point with varied, meaningless parameters.
  echo "gamma:", gamma, " iota:", iota, " verb:", verb
  for i, p in paths: echo "args[", i, "]: ", repr(p)
  return 42

proc whoa(zeta=1, eta=2.0, verb=false, names: seq[string]): int =
  ## Another entry point; here we echoResult
  echo "zeta:", zeta, " eta:", eta, " verb:", verb
  for i, n in names: echo "args[", i, "]: ", repr(n)
  return 12345

proc nelly(hooves=4, races=9, verb=false, names: seq[string]): string =
  ## Yet another entry point; here we block autoEcho
  echo "hooves:", hooves, " races:", races, " verb:", verb
  for i, n in names: echo "args[", i, "]: ", repr(n)
  return "42"

when isMainModule:
  import cligen
  include cligen/mergeCfgEnv
  cligenVersion = "0.0.1"
  dispatchMultiGen([ "apple" ],
                   [ demo, help = { "verb": "on=chatty, off=quiet" },
                     mergeNames = @["MultiMulti", "apple", "demo"] ],
                   [ show, cmdName="print", short = { "gamma": 'z' },
                     mergeNames = @["MultiMulti", "apple", "show"] ])
  dispatchMulti([ apple, stopWords = @["demo", "show"],
                         doc = "apple sub-sub commands" ],
                [ whoa, echoResult=true ],
                [ nelly, noAutoEcho=true ])
<commit_msg>Put nested multi-command in the middle so (currently missing) indenting is more visually obvious.<commit_after>proc demo(alpha=1, beta=2.0, verb=false, item="", files: seq[string]) =
  ## demo entry point with varied, meaningless parameters.
  echo "alpha:", alpha, " beta:", beta, " verb:", verb, " item:", repr(item)
  for i, f in files: echo "args[", i, "]: ", repr(f)

proc show(gamma=1, iota=2.0, verb=false, paths: seq[string]): int =
  ## show entry point with varied, meaningless parameters.
  echo "gamma:", gamma, " iota:", iota, " verb:", verb
  for i, p in paths: echo "args[", i, "]: ", repr(p)
  return 42

proc whoa(zeta=1, eta=2.0, verb=false, names: seq[string]): int =
  ## Another entry point; here we echoResult
  echo "zeta:", zeta, " eta:", eta, " verb:", verb
  for i, n in names: echo "args[", i, "]: ", repr(n)
  return 12345

proc nelly(hooves=4, races=9, verb=false, names: seq[string]): string =
  ## Yet another entry point; here we block autoEcho
  echo "hooves:", hooves, " races:", races, " verb:", verb
  for i, n in names: echo "args[", i, "]: ", repr(n)
  return "42"

when isMainModule:
  import cligen
  include cligen/mergeCfgEnv
  cligenVersion = "0.0.1"
  dispatchMultiGen([ "apple" ],
                   [ demo, help = { "verb": "on=chatty, off=quiet" },
                     mergeNames = @["MultiMulti", "apple", "demo"] ],
                   [ show, cmdName="print", short = { "gamma": 'z' },
                     mergeNames = @["MultiMulti", "apple", "show"] ])
  dispatchMulti([ whoa, echoResult=true ],
                [ apple, stopWords = @["demo", "show"],
                         doc = "apple sub-sub commands" ],
                [ nelly, noAutoEcho=true ])

{'fraction_non_alphanumeric': 0.17827130852340936, 'fraction_numerical': 0.013805522208883553, 'mean_word_length': 3.0351089588377724, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1506446', 'n_tokens_mistral': 1143, 'n_tokens_neox': 1086, 'n_words': 351}