<commit_before># This tests if things work if the wrapped user-proc uses identifiers also in
# our generated dispatch proc.  Should be fine as long as no imports pull in a
# name like "disapatcherFoo".

proc demo(usage=1, cmdline="bad name", getopt="ho", args: seq[string]): int =
  echo "usage:", usage, " cmdline:", repr(cmdline), " getopt:", getopt
  for i, arg in args: echo "positional[", i, "]: ", repr(arg)
  return 42

when isMainModule:
  import cligen
  dispatch(demo)<commit_msg>Use purpose of program for test command doc.<commit_after>proc demo(usage=1, cmdline="bad name", getopt="ho", args: seq[string]): int =
  ## This tests if things work when a wrapped user-proc uses identifiers also
  ## used in our generated dispatch proc.
  echo "usage:", usage, " cmdline:", repr(cmdline), " getopt:", getopt
  for i, arg in args: echo "positional[", i, "]: ", repr(arg)
  return 42

when isMainModule:
  import cligen
  dispatch(demo)
{'fraction_non_alphanumeric': 0.1283138918345705, 'fraction_numerical': 0.006362672322375398, 'mean_word_length': 4.686746987951807, 'pattern_counts': {'":': 0, '<': 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': '744274', 'n_tokens_mistral': 302, 'n_tokens_neox': 286, 'n_words': 118}