cmd2 3.5.1__tar.gz → 4.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (276) hide show
  1. {cmd2-3.5.1 → cmd2-4.0.0}/.pre-commit-config.yaml +17 -2
  2. cmd2-4.0.0/.typos.toml +5 -0
  3. {cmd2-3.5.1 → cmd2-4.0.0}/CHANGELOG.md +186 -0
  4. {cmd2-3.5.1 → cmd2-4.0.0}/Makefile +7 -5
  5. {cmd2-3.5.1 → cmd2-4.0.0}/PKG-INFO +10 -15
  6. {cmd2-3.5.1 → cmd2-4.0.0}/README.md +7 -8
  7. cmd2-4.0.0/cmd2/__init__.py +127 -0
  8. cmd2-4.0.0/cmd2/annotated.py +2346 -0
  9. cmd2-4.0.0/cmd2/argparse_completer.py +809 -0
  10. cmd2-4.0.0/cmd2/argparse_utils.py +1109 -0
  11. {cmd2-3.5.1 → cmd2-4.0.0}/cmd2/cmd2.py +2142 -2332
  12. {cmd2-3.5.1 → cmd2-4.0.0}/cmd2/colors.py +1 -6
  13. cmd2-4.0.0/cmd2/command_set.py +137 -0
  14. cmd2-4.0.0/cmd2/completion.py +307 -0
  15. cmd2-4.0.0/cmd2/constants.py +91 -0
  16. cmd2-4.0.0/cmd2/decorators.py +480 -0
  17. {cmd2-3.5.1 → cmd2-4.0.0}/cmd2/exceptions.py +10 -6
  18. {cmd2-3.5.1 → cmd2-4.0.0}/cmd2/history.py +24 -26
  19. {cmd2-3.5.1 → cmd2-4.0.0}/cmd2/parsing.py +210 -188
  20. {cmd2-3.5.1 → cmd2-4.0.0}/cmd2/plugin.py +2 -6
  21. cmd2-4.0.0/cmd2/pt_utils.py +376 -0
  22. {cmd2-3.5.1 → cmd2-4.0.0}/cmd2/py_bridge.py +19 -30
  23. cmd2-4.0.0/cmd2/rich_utils.py +713 -0
  24. {cmd2-3.5.1 → cmd2-4.0.0}/cmd2/string_utils.py +22 -1
  25. {cmd2-3.5.1 → cmd2-4.0.0}/cmd2/styles.py +31 -8
  26. cmd2-4.0.0/cmd2/theme.py +302 -0
  27. cmd2-4.0.0/cmd2/types.py +113 -0
  28. {cmd2-3.5.1 → cmd2-4.0.0}/cmd2/utils.py +118 -109
  29. {cmd2-3.5.1 → cmd2-4.0.0}/cmd2.egg-info/PKG-INFO +10 -15
  30. {cmd2-3.5.1 → cmd2-4.0.0}/cmd2.egg-info/SOURCES.txt +28 -38
  31. cmd2-4.0.0/cmd2.egg-info/requires.txt +4 -0
  32. cmd2-4.0.0/docs/api/annotated.md +3 -0
  33. cmd2-4.0.0/docs/api/argparse_utils.md +3 -0
  34. cmd2-4.0.0/docs/api/command_set.md +3 -0
  35. cmd2-4.0.0/docs/api/completion.md +3 -0
  36. {cmd2-3.5.1 → cmd2-4.0.0}/docs/api/index.md +5 -7
  37. cmd2-4.0.0/docs/api/pt_utils.md +3 -0
  38. {cmd2-3.5.1 → cmd2-4.0.0}/docs/doc_conventions.md +1 -1
  39. {cmd2-3.5.1 → cmd2-4.0.0}/docs/examples/alternate_event_loops.md +9 -1
  40. {cmd2-3.5.1 → cmd2-4.0.0}/docs/examples/getting_started.md +12 -6
  41. cmd2-4.0.0/docs/features/annotated.md +460 -0
  42. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/argument_processing.md +40 -30
  43. cmd2-4.0.0/docs/features/async_commands.md +74 -0
  44. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/builtin_commands.md +12 -13
  45. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/completion.md +12 -18
  46. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/generating_output.md +11 -10
  47. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/help.md +56 -30
  48. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/history.md +21 -32
  49. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/hooks.md +3 -1
  50. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/index.md +2 -1
  51. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/initialization.md +12 -7
  52. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/misc.md +4 -20
  53. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/modular_commands.md +101 -60
  54. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/os.md +8 -8
  55. cmd2-4.0.0/docs/features/prompt.md +99 -0
  56. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/settings.md +8 -22
  57. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/startup_commands.md +1 -1
  58. cmd2-4.0.0/docs/features/theme.md +29 -0
  59. {cmd2-3.5.1 → cmd2-4.0.0}/docs/migrating/incompatibilities.md +3 -3
  60. {cmd2-3.5.1 → cmd2-4.0.0}/docs/migrating/next_steps.md +2 -2
  61. {cmd2-3.5.1 → cmd2-4.0.0}/docs/migrating/why.md +6 -7
  62. {cmd2-3.5.1 → cmd2-4.0.0}/docs/overview/alternatives.md +7 -11
  63. {cmd2-3.5.1 → cmd2-4.0.0}/docs/overview/installation.md +3 -36
  64. {cmd2-3.5.1 → cmd2-4.0.0}/docs/overview/integrating.md +0 -13
  65. {cmd2-3.5.1 → cmd2-4.0.0}/docs/upgrades.md +61 -1
  66. {cmd2-3.5.1 → cmd2-4.0.0}/examples/README.md +9 -8
  67. cmd2-4.0.0/examples/annotated_example.py +545 -0
  68. {cmd2-3.5.1 → cmd2-4.0.0}/examples/argparse_completion.py +31 -28
  69. {cmd2-3.5.1 → cmd2-4.0.0}/examples/argparse_example.py +43 -44
  70. {cmd2-3.5.1 → cmd2-4.0.0}/examples/async_call.py +18 -24
  71. cmd2-4.0.0/examples/async_commands.py +145 -0
  72. {cmd2-3.5.1 → cmd2-4.0.0}/examples/async_printing.py +44 -59
  73. cmd2-4.0.0/examples/basic_completion.py +56 -0
  74. cmd2-4.0.0/examples/cmd2_history.dat +0 -0
  75. {cmd2-3.5.1 → cmd2-4.0.0}/examples/cmd_as_argument.py +35 -36
  76. {cmd2-3.5.1 → cmd2-4.0.0}/examples/color.py +4 -4
  77. {cmd2-3.5.1 → cmd2-4.0.0}/examples/command_sets.py +42 -45
  78. cmd2-4.0.0/examples/completion_item_choices.py +144 -0
  79. {cmd2-3.5.1 → cmd2-4.0.0}/examples/custom_parser.py +12 -13
  80. {cmd2-3.5.1 → cmd2-4.0.0}/examples/custom_types.py +10 -10
  81. cmd2-4.0.0/examples/default_categories.py +68 -0
  82. {cmd2-3.5.1 → cmd2-4.0.0}/examples/dynamic_commands.py +3 -3
  83. {cmd2-3.5.1 → cmd2-4.0.0}/examples/environment.py +5 -5
  84. {cmd2-3.5.1 → cmd2-4.0.0}/examples/event_loops.py +1 -1
  85. {cmd2-3.5.1 → cmd2-4.0.0}/examples/exit_code.py +2 -2
  86. {cmd2-3.5.1 → cmd2-4.0.0}/examples/getting_started.py +49 -17
  87. {cmd2-3.5.1 → cmd2-4.0.0}/examples/hello_cmd2.py +6 -3
  88. {cmd2-3.5.1 → cmd2-4.0.0}/examples/help_categories.py +34 -34
  89. {cmd2-3.5.1 → cmd2-4.0.0}/examples/hooks.py +6 -8
  90. {cmd2-3.5.1 → cmd2-4.0.0}/examples/migrating.py +17 -13
  91. {cmd2-3.5.1 → cmd2-4.0.0}/examples/mixin.py +3 -3
  92. cmd2-4.0.0/examples/modular_commands/commandset_basic.py +47 -0
  93. {cmd2-3.5.1 → cmd2-4.0.0}/examples/modular_commands/commandset_complex.py +17 -15
  94. {cmd2-3.5.1 → cmd2-4.0.0}/examples/modular_commands/commandset_custominit.py +8 -5
  95. cmd2-3.5.1/examples/modular_commands.py → cmd2-4.0.0/examples/modular_commandsets.py +6 -6
  96. {cmd2-3.5.1 → cmd2-4.0.0}/examples/paged_output.py +6 -6
  97. {cmd2-3.5.1 → cmd2-4.0.0}/examples/persistent_history.py +3 -3
  98. cmd2-4.0.0/examples/pretty_print.py +28 -0
  99. {cmd2-3.5.1 → cmd2-4.0.0}/examples/python_scripting.py +14 -14
  100. {cmd2-3.5.1 → cmd2-4.0.0}/examples/read_input.py +39 -25
  101. {cmd2-3.5.1 → cmd2-4.0.0}/examples/remove_builtin_commands.py +2 -2
  102. {cmd2-3.5.1 → cmd2-4.0.0}/examples/remove_settable.py +2 -2
  103. {cmd2-3.5.1 → cmd2-4.0.0}/examples/rich_tables.py +13 -18
  104. {cmd2-3.5.1 → cmd2-4.0.0}/examples/rich_theme.py +14 -5
  105. {cmd2-3.5.1 → cmd2-4.0.0}/examples/scripts/conditional.py +10 -10
  106. cmd2-4.0.0/examples/scripts/save_help_text.py +107 -0
  107. {cmd2-3.5.1 → cmd2-4.0.0}/examples/unicode_commands.py +2 -2
  108. {cmd2-3.5.1 → cmd2-4.0.0}/mkdocs.yml +17 -14
  109. {cmd2-3.5.1 → cmd2-4.0.0}/pyproject.toml +9 -13
  110. {cmd2-3.5.1 → cmd2-4.0.0}/ruff.toml +4 -9
  111. {cmd2-3.5.1 → cmd2-4.0.0}/scripts/validate_tag.py +5 -5
  112. {cmd2-3.5.1 → cmd2-4.0.0}/tests/conftest.py +11 -68
  113. {cmd2-3.5.1 → cmd2-4.0.0}/tests/pyscript/echo.py +2 -2
  114. {cmd2-3.5.1 → cmd2-4.0.0}/tests/pyscript/environment.py +1 -3
  115. {cmd2-3.5.1 → cmd2-4.0.0}/tests/pyscript/help.py +1 -1
  116. {cmd2-3.5.1 → cmd2-4.0.0}/tests/pyscript/raises_exception.py +1 -1
  117. {cmd2-3.5.1 → cmd2-4.0.0}/tests/pyscript/recursive.py +1 -1
  118. {cmd2-3.5.1 → cmd2-4.0.0}/tests/pyscript/self_in_py.py +1 -1
  119. {cmd2-3.5.1 → cmd2-4.0.0}/tests/pyscript/stop.py +2 -2
  120. cmd2-4.0.0/tests/pyscript/test_print.py +29 -0
  121. cmd2-4.0.0/tests/scripts/postcmds.txt +1 -0
  122. cmd2-4.0.0/tests/test_annotated.py +3651 -0
  123. {cmd2-3.5.1 → cmd2-4.0.0}/tests/test_argparse.py +194 -156
  124. cmd2-4.0.0/tests/test_argparse_completer.py +1435 -0
  125. cmd2-4.0.0/tests/test_argparse_subcommands.py +131 -0
  126. cmd2-4.0.0/tests/test_argparse_utils.py +892 -0
  127. cmd2-4.0.0/tests/test_categories.py +130 -0
  128. cmd2-4.0.0/tests/test_cmd2.py +4642 -0
  129. {cmd2-3.5.1 → cmd2-4.0.0}/tests/test_commandset.py +320 -349
  130. cmd2-4.0.0/tests/test_completion.py +1472 -0
  131. cmd2-4.0.0/tests/test_dynamic_complete_style.py +75 -0
  132. {cmd2-3.5.1 → cmd2-4.0.0}/tests/test_future_annotations.py +2 -2
  133. {cmd2-3.5.1 → cmd2-4.0.0}/tests/test_history.py +298 -303
  134. cmd2-4.0.0/tests/test_parsing.py +1079 -0
  135. {cmd2-3.5.1 → cmd2-4.0.0}/tests/test_plugin.py +86 -86
  136. cmd2-4.0.0/tests/test_pt_utils.py +822 -0
  137. cmd2-4.0.0/tests/test_py_completion.py +54 -0
  138. cmd2-4.0.0/tests/test_rich_utils.py +344 -0
  139. cmd2-4.0.0/tests/test_run_pyscript.py +264 -0
  140. {cmd2-3.5.1 → cmd2-4.0.0}/tests/test_string_utils.py +55 -29
  141. cmd2-4.0.0/tests/test_theme.py +344 -0
  142. {cmd2-3.5.1 → cmd2-4.0.0}/tests/test_utils.py +123 -64
  143. cmd2-3.5.1/cmd2/__init__.py +0 -101
  144. cmd2-3.5.1/cmd2/argparse_completer.py +0 -760
  145. cmd2-3.5.1/cmd2/argparse_custom.py +0 -1421
  146. cmd2-3.5.1/cmd2/command_definition.py +0 -202
  147. cmd2-3.5.1/cmd2/constants.py +0 -54
  148. cmd2-3.5.1/cmd2/decorators.py +0 -391
  149. cmd2-3.5.1/cmd2/rich_utils.py +0 -487
  150. cmd2-3.5.1/cmd2/rl_utils.py +0 -301
  151. cmd2-3.5.1/cmd2/terminal_utils.py +0 -144
  152. cmd2-3.5.1/cmd2/transcript.py +0 -225
  153. cmd2-3.5.1/cmd2.egg-info/requires.txt +0 -13
  154. cmd2-3.5.1/docs/api/argparse_custom.md +0 -3
  155. cmd2-3.5.1/docs/api/command_definition.md +0 -3
  156. cmd2-3.5.1/docs/api/rl_utils.md +0 -3
  157. cmd2-3.5.1/docs/api/terminal_utils.md +0 -3
  158. cmd2-3.5.1/docs/api/transcript.md +0 -3
  159. cmd2-3.5.1/docs/features/prompt.md +0 -50
  160. cmd2-3.5.1/docs/features/theme.md +0 -10
  161. cmd2-3.5.1/docs/features/transcripts.md +0 -182
  162. cmd2-3.5.1/examples/basic_completion.py +0 -99
  163. cmd2-3.5.1/examples/default_categories.py +0 -76
  164. cmd2-3.5.1/examples/modular_commands/commandset_basic.py +0 -87
  165. cmd2-3.5.1/examples/pretty_print.py +0 -44
  166. cmd2-3.5.1/examples/scripts/save_help_text.py +0 -97
  167. cmd2-3.5.1/examples/transcript_example.py +0 -84
  168. cmd2-3.5.1/examples/transcripts/exampleSession.txt +0 -14
  169. cmd2-3.5.1/examples/transcripts/pirate.transcript +0 -10
  170. cmd2-3.5.1/examples/transcripts/quit.txt +0 -1
  171. cmd2-3.5.1/examples/transcripts/transcript_regex.txt +0 -15
  172. cmd2-3.5.1/tests/pyscript/stdout_capture.py +0 -4
  173. cmd2-3.5.1/tests/scripts/postcmds.txt +0 -1
  174. cmd2-3.5.1/tests/test_argparse_completer.py +0 -1358
  175. cmd2-3.5.1/tests/test_argparse_custom.py +0 -341
  176. cmd2-3.5.1/tests/test_argparse_subcommands.py +0 -133
  177. cmd2-3.5.1/tests/test_async_alert.py +0 -50
  178. cmd2-3.5.1/tests/test_categories.py +0 -109
  179. cmd2-3.5.1/tests/test_cmd2.py +0 -3359
  180. cmd2-3.5.1/tests/test_completion.py +0 -1524
  181. cmd2-3.5.1/tests/test_parsing.py +0 -1149
  182. cmd2-3.5.1/tests/test_rich_utils.py +0 -254
  183. cmd2-3.5.1/tests/test_run_pyscript.py +0 -215
  184. cmd2-3.5.1/tests/test_terminal_utils.py +0 -81
  185. cmd2-3.5.1/tests/test_transcript.py +0 -328
  186. cmd2-3.5.1/tests/transcripts/bol_eol.txt +0 -6
  187. cmd2-3.5.1/tests/transcripts/characterclass.txt +0 -6
  188. cmd2-3.5.1/tests/transcripts/dotstar.txt +0 -4
  189. cmd2-3.5.1/tests/transcripts/extension_notation.txt +0 -4
  190. cmd2-3.5.1/tests/transcripts/failure.txt +0 -4
  191. cmd2-3.5.1/tests/transcripts/from_cmdloop.txt +0 -44
  192. cmd2-3.5.1/tests/transcripts/multiline_no_regex.txt +0 -6
  193. cmd2-3.5.1/tests/transcripts/multiline_regex.txt +0 -6
  194. cmd2-3.5.1/tests/transcripts/no_output.txt +0 -7
  195. cmd2-3.5.1/tests/transcripts/no_output_last.txt +0 -7
  196. cmd2-3.5.1/tests/transcripts/singleslash.txt +0 -5
  197. cmd2-3.5.1/tests/transcripts/slashes_escaped.txt +0 -6
  198. cmd2-3.5.1/tests/transcripts/slashslash.txt +0 -4
  199. cmd2-3.5.1/tests/transcripts/spaces.txt +0 -8
  200. cmd2-3.5.1/tests/transcripts/word_boundaries.txt +0 -6
  201. {cmd2-3.5.1 → cmd2-4.0.0}/.prettierignore +0 -0
  202. {cmd2-3.5.1 → cmd2-4.0.0}/.prettierrc +0 -0
  203. {cmd2-3.5.1 → cmd2-4.0.0}/GEMINI.md +0 -0
  204. {cmd2-3.5.1 → cmd2-4.0.0}/LICENSE +0 -0
  205. {cmd2-3.5.1 → cmd2-4.0.0}/MANIFEST.in +0 -0
  206. {cmd2-3.5.1 → cmd2-4.0.0}/cmd2/clipboard.py +0 -0
  207. {cmd2-3.5.1 → cmd2-4.0.0}/cmd2/py.typed +0 -0
  208. {cmd2-3.5.1 → cmd2-4.0.0}/cmd2.egg-info/dependency_links.txt +0 -0
  209. {cmd2-3.5.1 → cmd2-4.0.0}/cmd2.egg-info/top_level.txt +0 -0
  210. {cmd2-3.5.1 → cmd2-4.0.0}/cmd2.png +0 -0
  211. {cmd2-3.5.1 → cmd2-4.0.0}/codecov.yml +0 -0
  212. {cmd2-3.5.1 → cmd2-4.0.0}/docs/api/argparse_completer.md +0 -0
  213. {cmd2-3.5.1 → cmd2-4.0.0}/docs/api/clipboard.md +0 -0
  214. {cmd2-3.5.1 → cmd2-4.0.0}/docs/api/cmd.md +0 -0
  215. {cmd2-3.5.1 → cmd2-4.0.0}/docs/api/colors.md +0 -0
  216. {cmd2-3.5.1 → cmd2-4.0.0}/docs/api/constants.md +0 -0
  217. {cmd2-3.5.1 → cmd2-4.0.0}/docs/api/decorators.md +0 -0
  218. {cmd2-3.5.1 → cmd2-4.0.0}/docs/api/exceptions.md +0 -0
  219. {cmd2-3.5.1 → cmd2-4.0.0}/docs/api/history.md +0 -0
  220. {cmd2-3.5.1 → cmd2-4.0.0}/docs/api/parsing.md +0 -0
  221. {cmd2-3.5.1 → cmd2-4.0.0}/docs/api/plugin.md +0 -0
  222. {cmd2-3.5.1 → cmd2-4.0.0}/docs/api/py_bridge.md +0 -0
  223. {cmd2-3.5.1 → cmd2-4.0.0}/docs/api/rich_utils.md +0 -0
  224. {cmd2-3.5.1 → cmd2-4.0.0}/docs/api/string_utils.md +0 -0
  225. {cmd2-3.5.1 → cmd2-4.0.0}/docs/api/styles.md +0 -0
  226. {cmd2-3.5.1 → cmd2-4.0.0}/docs/api/utils.md +0 -0
  227. {cmd2-3.5.1 → cmd2-4.0.0}/docs/examples/examples.md +0 -0
  228. {cmd2-3.5.1 → cmd2-4.0.0}/docs/examples/index.md +0 -0
  229. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/clipboard.md +0 -0
  230. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/commands.md +0 -0
  231. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/disable_commands.md +0 -0
  232. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/embedded_python_shells.md +0 -0
  233. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/multiline_commands.md +0 -0
  234. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/packaging.md +0 -0
  235. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/plugins.md +0 -0
  236. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/redirection.md +0 -0
  237. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/scripting.md +0 -0
  238. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/shortcuts_aliases_macros.md +0 -0
  239. {cmd2-3.5.1 → cmd2-4.0.0}/docs/features/table_creation.md +0 -0
  240. {cmd2-3.5.1 → cmd2-4.0.0}/docs/index.md +0 -0
  241. {cmd2-3.5.1 → cmd2-4.0.0}/docs/javascripts/readthedocs.js +0 -0
  242. {cmd2-3.5.1 → cmd2-4.0.0}/docs/migrating/index.md +0 -0
  243. {cmd2-3.5.1 → cmd2-4.0.0}/docs/migrating/minimum.md +0 -0
  244. {cmd2-3.5.1 → cmd2-4.0.0}/docs/mixins/index.md +0 -0
  245. {cmd2-3.5.1 → cmd2-4.0.0}/docs/mixins/mixin_template.md +0 -0
  246. {cmd2-3.5.1 → cmd2-4.0.0}/docs/overrides/main.html +0 -0
  247. {cmd2-3.5.1 → cmd2-4.0.0}/docs/overview/index.md +0 -0
  248. {cmd2-3.5.1 → cmd2-4.0.0}/docs/overview/resources.md +0 -0
  249. {cmd2-3.5.1 → cmd2-4.0.0}/docs/stylesheets/cmd2.css +0 -0
  250. {cmd2-3.5.1 → cmd2-4.0.0}/docs/testing.md +0 -0
  251. {cmd2-3.5.1 → cmd2-4.0.0}/examples/.cmd2rc +0 -0
  252. {cmd2-3.5.1 → cmd2-4.0.0}/examples/modular_commands/__init__.py +0 -0
  253. {cmd2-3.5.1 → cmd2-4.0.0}/examples/scripts/arg_printer.py +0 -0
  254. {cmd2-3.5.1 → cmd2-4.0.0}/examples/scripts/nested.txt +0 -0
  255. {cmd2-3.5.1 → cmd2-4.0.0}/examples/scripts/quit.txt +0 -0
  256. {cmd2-3.5.1 → cmd2-4.0.0}/examples/scripts/script.py +0 -0
  257. {cmd2-3.5.1 → cmd2-4.0.0}/examples/scripts/script.txt +0 -0
  258. {cmd2-3.5.1 → cmd2-4.0.0}/examples/tmux_launch.sh +0 -0
  259. {cmd2-3.5.1 → cmd2-4.0.0}/examples/tmux_split.sh +0 -0
  260. {cmd2-3.5.1 → cmd2-4.0.0}/package.json +0 -0
  261. {cmd2-3.5.1 → cmd2-4.0.0}/setup.cfg +0 -0
  262. {cmd2-3.5.1 → cmd2-4.0.0}/tests/.cmd2rc +0 -0
  263. {cmd2-3.5.1 → cmd2-4.0.0}/tests/__init__.py +0 -0
  264. {cmd2-3.5.1 → cmd2-4.0.0}/tests/pyscript/py_locals.py +0 -0
  265. {cmd2-3.5.1 → cmd2-4.0.0}/tests/pyscript/pyscript_dir.py +0 -0
  266. {cmd2-3.5.1 → cmd2-4.0.0}/tests/relative_multiple.txt +0 -0
  267. {cmd2-3.5.1 → cmd2-4.0.0}/tests/script.py +0 -0
  268. {cmd2-3.5.1 → cmd2-4.0.0}/tests/script.txt +0 -0
  269. {cmd2-3.5.1 → cmd2-4.0.0}/tests/scripts/binary.bin +0 -0
  270. {cmd2-3.5.1 → cmd2-4.0.0}/tests/scripts/empty.txt +0 -0
  271. {cmd2-3.5.1 → cmd2-4.0.0}/tests/scripts/help.txt +0 -0
  272. {cmd2-3.5.1 → cmd2-4.0.0}/tests/scripts/nested.txt +0 -0
  273. {cmd2-3.5.1 → cmd2-4.0.0}/tests/scripts/one_down.txt +0 -0
  274. {cmd2-3.5.1 → cmd2-4.0.0}/tests/scripts/precmds.txt +0 -0
  275. {cmd2-3.5.1 → cmd2-4.0.0}/tests/scripts/utf8.txt +0 -0
  276. {cmd2-3.5.1 → cmd2-4.0.0}/tests/test_utils_defining_class.py +0 -0
@@ -3,13 +3,18 @@ repos:
3
3
  rev: "v6.0.0"
4
4
  hooks:
5
5
  - id: check-case-conflict
6
+ - id: check-executables-have-shebangs
6
7
  - id: check-merge-conflict
7
8
  - id: check-toml
9
+ - id: check-yaml
10
+ - id: detect-private-key
8
11
  - id: end-of-file-fixer
12
+ - id: fix-byte-order-marker
13
+ - id: mixed-line-ending
9
14
  - id: trailing-whitespace
10
15
 
11
16
  - repo: https://github.com/astral-sh/ruff-pre-commit
12
- rev: "v0.15.0"
17
+ rev: "v0.15.16"
13
18
  hooks:
14
19
  - id: ruff-format
15
20
  args: [--config=ruff.toml]
@@ -21,5 +26,15 @@ repos:
21
26
  hooks:
22
27
  - id: prettier
23
28
  additional_dependencies:
24
- - prettier@3.8.1
29
+ - prettier@3.8.3
25
30
  - prettier-plugin-toml@2.0.6
31
+
32
+ - repo: https://github.com/crate-ci/typos
33
+ rev: v1.47.2
34
+ hooks:
35
+ - id: typos
36
+ exclude: |
37
+ (?x)^(
38
+ ruff.toml|
39
+ tests/.*
40
+ )$
cmd2-4.0.0/.typos.toml ADDED
@@ -0,0 +1,5 @@
1
+ [default.extend-words]
2
+ EXPLIoT = "EXPLIoT"
3
+ Counterfit = "Counterfit"
4
+ expliot = "expliot"
5
+ counterfit = "counterfit"
@@ -1,3 +1,189 @@
1
+ ## 4.0.0 (June 5, 2026)
2
+
3
+ ### Summary
4
+
5
+ `cmd2` now has a dependency on
6
+ [prompt-toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit) which serves as a
7
+ pure-Python cross-platform replacement for
8
+ [GNU Readline](https://tiswww.case.edu/php/chet/readline/rltop.html). Previously, `cmd2` had used
9
+ different `readline` dependencies on each Operating System (OS) which was at times a very
10
+ frustrating developer and user experience due to small inconsistencies in these different readline
11
+ libraries. Now we have consistent cross-platform support for tab-completion, user terminal input,
12
+ and history. Additionally, this opens up some cool advanced features such as support for syntax
13
+ highlighting of user input while typing, auto-suggestions similar to those provided by the fish
14
+ shell, and the option for a persistent bottom bar that can display realtime status updates while the
15
+ prompt is displayed.
16
+
17
+ ### Details
18
+
19
+ - Breaking Changes
20
+ - Removed all use of `readline` built-in module and underlying platform libraries
21
+ - Deleted `cmd2.rl_utils` module which dealt with importing the proper `readline` module for
22
+ each platform and provided utility functions related to `readline`
23
+ - Added a dependency on `prompt-toolkit` and a new `cmd2.pt_utils` module with supporting
24
+ utilities
25
+ - Dropped support for Python 3.10. `cmd2` now requires Python 3.11 or later
26
+ - Removed **Transcript Testing** feature set along with the `history -t` option for generating
27
+ transcript files and the `cmd2.transcript` module
28
+ - This was an extremely brittle regression testing framework which should never have been
29
+ built into cmd2
30
+ - We recommend using [pytest](https://docs.pytest.org/) for unit and integration tests and
31
+ [Robot Framework](https://robotframework.org/) for acceptance tests. Both of these
32
+ frameworks can be used to create tests which are far more reliable and less brittle.
33
+ - Async specific: `prompt-toolkit` starts its own `asyncio` event loop in every `cmd2`
34
+ application
35
+ - Removed `cmd2.Cmd.terminal_lock` as it is no longer required to support things like
36
+ `cmd2.Cmd.async_alert`
37
+ - Removed `cmd2.Cmd.async_refresh_prompt` and `cmd2.Cmd.need_prompt_refresh` as they are no
38
+ longer needed
39
+ - `completer` functions must now return a `cmd2.Completions` object instead of `list[str]`.
40
+ - `choices_provider` functions must now return a `cmd2.Choices` object instead of `list[str]`.
41
+ - An argparse argument's `descriptive_headers` field is now called `table_columns`.
42
+ - `CompletionItem.descriptive_data` is now called `CompletionItem.table_data`.
43
+ - Removed `DEFAULT_DESCRIPTIVE_HEADERS`. This means you must define `table_columns` when using
44
+ `CompletionItem.table_data` data.
45
+ - `Cmd.default_sort_key` moved to `utils.DEFAULT_STR_SORT_KEY`.
46
+ - Moved completion state data, which previously resided in `Cmd`, into other classes.
47
+ - `Cmd.matches_sorted` -> `Completions.is_sorted` and `Choices.is_sorted`
48
+ - `Cmd.completion_hint` -> `Completions.hint`
49
+ - `Cmd.formatted_completions` -> `Completions.table` (Now a Rich Table)
50
+ - `Cmd.allow_appended_space/allow_closing_quote` -> `Completions.allow_finalization`
51
+ - Removed `Cmd.matches_delimited` since it's no longer used.
52
+ - Removed `flag_based_complete` and `index_based_complete` functions since their functionality
53
+ is already provided in arpgarse-based completion.
54
+ - Changed `Statement.multiline_command` from a string to a bool.
55
+ - Made `Statement.arg_list` a property which generates the list on-demand.
56
+ - Renamed `Statement.output` to `Statement.redirector`.
57
+ - Renamed `Statement.output_to` to `Statement.redirect_to`.
58
+ - Removed `Statement.pipe_to` since it can be handled by `Statement.redirector` and
59
+ `Statement.redirect_to`.
60
+ - Changed `StatementParser.parse_command_only()` to return a `PartialStatement` object.
61
+ - Renamed `Macro.arg_list` to `Macro.args`.
62
+ - Removed `terminal_utils.py` since `prompt-toolkit` provides this functionality.
63
+ - Replaced `async_alert()` and `async_update_prompt()` with a single function called
64
+ `add_alert()`. This new function is thread-safe and does not require you to acquire a mutex
65
+ before calling it like the previous functions did.
66
+ - Removed `Cmd.default_to_shell`.
67
+ - Removed `Cmd.ruler` since `cmd2` no longer uses it.
68
+ - All parsers used with `cmd2` commands must be an instance of `Cmd2ArgumentParser` or a child
69
+ class of it.
70
+ - Renamed `set_default_argument_parser_type()` to `set_default_argument_parser()`.
71
+ - Renamed `set_default_ap_completer_type()` to `set_default_argparse_completer()`.
72
+ - Removed `set_ap_completer_type()` and `get_ap_completer_type()` since `completer_class` is now
73
+ a public member of `Cmd2ArgumentParser`.
74
+ - Moved `set_parser_prog()` to `Cmd2ArgumentParser.update_prog()`.
75
+ - Renamed `cmd2_handler` to `cmd2_subcommand_func` in the `argparse.Namespace` for clarity.
76
+ - Removed `Cmd2AttributeWrapper` class. `argparse.Namespace` objects passed to command functions
77
+ now contain direct attributes for `cmd2_statement` and `cmd2_subcommand_func`.
78
+ - Renamed `cmd2/command_definition.py` to `cmd2/command_set.py`.
79
+ - Removed `Cmd.doc_header` and the `with_default_category` decorator. Help categorization is now
80
+ driven by the `DEFAULT_CATEGORY` class variable (see **Simplified command categorization** in
81
+ the Enhancements section below for details).
82
+ - Removed `Cmd.undoc_header` since all commands are now considered categorized.
83
+ - Renamed `Cmd.cmd_func()` to `Cmd.get_command_func()`.
84
+ - `cmd2` no longer sets a default title for a subparsers group. If you desire a title, you will
85
+ need to pass one in like this `parser.add_subparsers(title="subcommands")`. This is standard
86
+ `argparse` behavior.
87
+ - `TextGroup` now implements `HelpFormatterRenderable` (see Enhancements section below for more
88
+ details).
89
+ - Removed `formatter_creator` parameter from `TextGroup.__init__()`.
90
+ - Removed `Cmd2ArgumentParser.create_text_group()` method.
91
+ - `argparse` and `Rich` integration refactoring:
92
+ - Renamed `argparse_custom` module to `argparse_utils`.
93
+ - Moved the following classes from `argparse_utils` to `rich_utils`:
94
+ - `Cmd2HelpFormatter`
95
+ - `ArgumentDefaultsCmd2HelpFormatter`
96
+ - `MetavarTypeCmd2HelpFormatter`
97
+ - `RawDescriptionCmd2HelpFormatter`
98
+ - `RawTextCmd2HelpFormatter`
99
+ - `TextGroup`
100
+ - Replaced the global `APP_THEME` constant in `rich_utils.py` with `get_theme()`,
101
+ `reset_theme()`, and `update_theme()` functions in `theme.py` to support lazy
102
+ initialization and safer in-place updates of the theme.
103
+ - Renamed `Cmd._command_parsers` to `Cmd.command_parsers`.
104
+ - Removed `RichPrintKwargs` `TypedDict` in favor of using `Mapping[str, Any]`, allowing for
105
+ greater flexibility in passing keyword arguments to `console.print()` calls.
106
+ - Removed `always_show_hint` settable as it provided a poor user experience with
107
+ `prompt-toolkit`
108
+ - `cmd2` redirection only captures output directed to `self.stdout` (e.g., via
109
+ `self.poutput()`). Standard `print()` calls write directly to `sys.stdout` and are not
110
+ captured. However, `print()` calls within `pyscripts` and the interactive Python shell are
111
+ treated as command output and sent to `self.stdout`, allowing them to be captured.
112
+ - Verbose help table descriptions are no longer generated from help function output. The system
113
+ now relies exclusively on command function docstrings.
114
+ - Removed `feedback_to_output` settable and changed `cmd2.Cmd.pfeedback` to always print to
115
+ `self.stdout`
116
+ - Removed `Cmd.parseline()` since it was unused and merely wrapped
117
+ `StatementParser.parse_command_only()`.
118
+ - Enhancements
119
+ - New `cmd2.Cmd` parameters
120
+ - **auto_suggest**: (boolean) if `True`, provide fish shell style auto-suggestions. These
121
+ are grayed-out hints based on history. User can press right-arrow key to accept the
122
+ provided suggestion.
123
+ - **bottom toolbar**: (boolean) if `True`, present a persistent bottom toolbar capable of
124
+ displaying realtime status information while the prompt is displayed, see the
125
+ `cmd2.Cmd2.get_bottom_toolbar` method that can be overridden as well as the updated
126
+ `getting_started.py` example
127
+ - New `cmd2.Cmd` methods
128
+ - **get_bottom_toolbar**: populates bottom toolbar if `bottom_toolbar` is `True`
129
+ - **get_rprompt**: override to populate right prompt
130
+ - **pre_prompt**: hook method that is called before the prompt is displayed, but after
131
+ `prompt-toolkit` event loop has started
132
+ - **read_secret**: read secrets like passwords without displaying them to the terminal
133
+ - **ppretty**: a cmd2-compatible replacement for `rich.pretty.pprint()`
134
+ - New settables:
135
+ - **max_column_completion_results**: (int) Maximum number of completion results to display
136
+ in a single column
137
+ - **traceback_show_locals**: (bool) Display local variables in tracebacks
138
+ - `cmd2.Cmd.select` has been revamped to use the
139
+ [choice](https://python-prompt-toolkit.readthedocs.io/en/3.0.52/pages/asking_for_a_choice.html)
140
+ function from `prompt-toolkit` when both **stdin** and **stdout** are TTYs
141
+ - Add support for Python 3.15 by fixing various bugs related to internal `argparse` changes
142
+ - Added `common_prefix` method to `cmd2.string_utils` module as a replacement for
143
+ `os.path.commonprefix` since that is now deprecated in Python 3.15
144
+ - Simplified command categorization:
145
+ - By default, all commands in a class are grouped under its `DEFAULT_CATEGORY`.
146
+ - Individual commands can still be manually moved using the `with_category()` decorator.
147
+ - For more details and examples, see the [Help](docs/features/help.md) documentation and the
148
+ `examples/default_categories.py` file.
149
+ - `CommandSet` is now a generic class, which allows developers to parameterize it with their
150
+ specific `cmd2.Cmd` subclass (e.g.,`class MyCommandSet(CommandSet[MyApp]):`). This provides
151
+ full type hints and IDE autocompletion for `self._cmd` without needing to override and cast
152
+ the property.
153
+ - Added `traceback_kwargs` attribute to allow customization of Rich-based tracebacks.
154
+ - Added `HelpFormatterRenderable` protocol and `HelpContent` type alias to support context-aware
155
+ help content in `argparse`.
156
+ - The `print()` function available in a `pyscript` writes to `self.stdout` and respects the
157
+ `allow_style` setting. It also supports printing `Rich` objects.
158
+ - Added `Cmd2ArgumentParser.output_to()` context manager to temporarily set the output stream
159
+ during `argparse` operations. This is helpful for directing output for functions like
160
+ `parse_args()`, which default to `sys.stdout` and lack a `file` argument.
161
+ - Added ability to customize `prompt-toolkit` completion menu colors by overriding the following
162
+ fields in the `cmd2` theme:
163
+ - `Cmd2Style.COMPLETION_MENU` - Base style for the entire completion menu container (sets
164
+ the background)
165
+ - `Cmd2Style.COMPLETION_MENU_COMPLETION` -Style for an individual, non-selected completion
166
+ item
167
+ - `Cmd2Style.COMPLETION_MENU_CURRENT` - Style for the currently selected completion item
168
+ - `Cmd2Style.COMPLETION_MENU_META` - Style for "meta" information shown alongside a
169
+ completion
170
+ - `Cmd2Style.COMPLETION_MENU_META_CURRENT`- Style for meta info of current item
171
+ - Updated `set` command to consolidate its confirmation output into a single, colorized line.
172
+ The confirmation now uses `pfeedback()`, allowing it to be silenced when the `quiet` settable
173
+ is enabled.
174
+ - `alias` and `macro` subcommands for `create` and `delete` now output their non-essential
175
+ success case output using `pfeedback`
176
+ - Experimental features
177
+ - New `@with_annotated` decorator, a type-hint-driven alternative to `@with_argparse` that
178
+ builds the parser automatically from a command's signature (positional/option inference,
179
+ enum/literal/path/collection handling, subcommands, groups, mutex). See the
180
+ [annotated_example.py](https://github.com/python-cmd2/cmd2/blob/main/examples/annotated_example.py)
181
+ example for demonstration of usage.
182
+ - This feature allows declaring `cmd2` command parameters using type hints using syntax
183
+ essentially identical to that used by [Typer](https://typer.tiangolo.com/)
184
+ - You use declarative syntax to define the arguments a command takes and the
185
+ `@with_annotated` decorator builds an `argparse` parser for you
186
+
1
187
  ## 3.5.1 (April 24, 2026)
2
188
 
3
189
  - Bug Fixes
@@ -7,8 +7,8 @@ install: ## Install the virtual environment with dependencies
7
7
  @echo "🚀 Creating uv Python virtual environment"
8
8
  @uv python install 3.14
9
9
  @uv sync --python=3.14
10
- @echo "🚀 Installing Git pre-commit hooks locally"
11
- @uv run pre-commit install
10
+ @echo "🚀 Installing Git prek hooks locally"
11
+ @uv run prek install -f
12
12
  @echo "🚀 Installing Prettier using npm"
13
13
  @npm install -q --no-fund --include=dev
14
14
 
@@ -16,8 +16,8 @@ install: ## Install the virtual environment with dependencies
16
16
  check: ## Run code quality tools.
17
17
  @echo "🚀 Checking lock file consistency with 'pyproject.toml'"
18
18
  @uv lock --locked
19
- @echo "🚀 Linting code and documentation: Running pre-commit"
20
- @uv run pre-commit run -a
19
+ @echo "🚀 Auto-formatting/Linting code and documentation: Running prek"
20
+ @uv run prek run -a
21
21
  @echo "🚀 Static type checking: Running mypy"
22
22
  @uv run mypy
23
23
 
@@ -77,7 +77,8 @@ publish: validate-tag build ## Publish a release to PyPI, uses token from ~/.pyp
77
77
  BUILD_DIRS = build dist *.egg-info
78
78
  DOC_DIRS = build
79
79
  MYPY_DIRS = .mypy_cache dmypy.json dmypy.sock
80
- TEST_DIRS = .cache .coverage .pytest_cache htmlcov
80
+ TEST_DIRS = .cache .pytest_cache htmlcov
81
+ TEST_FILES = .coverage coverage.xml
81
82
 
82
83
  .PHONY: clean-build
83
84
  clean-build: ## Clean build artifacts
@@ -108,6 +109,7 @@ clean-ruff: ## Clean ruff artifacts
108
109
  clean-test: ## Clean test artifacts
109
110
  @echo "🚀 Removing test artifacts"
110
111
  @uv run python -c "import shutil; import os; [shutil.rmtree(d, ignore_errors=True) for d in '$(TEST_DIRS)'.split() if os.path.isdir(d)]"
112
+ @uv run python -c "from pathlib import Path; [Path(f).unlink(missing_ok=True) for f in '$(TEST_FILES)'.split()]"
111
113
 
112
114
  .PHONY: clean
113
115
  clean: clean-build clean-docs clean-mypy clean-pycache clean-ruff clean-test ## Clean all artifacts
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cmd2
3
- Version: 3.5.1
3
+ Version: 4.0.0
4
4
  Summary: cmd2 - quickly build feature-rich and user-friendly interactive command line applications in Python
5
5
  Author: cmd2 Contributors
6
6
  License-Expression: MIT
@@ -11,7 +11,6 @@ Classifier: Operating System :: OS Independent
11
11
  Classifier: Intended Audience :: Developers
12
12
  Classifier: Intended Audience :: System Administrators
13
13
  Classifier: Programming Language :: Python :: 3 :: Only
14
- Classifier: Programming Language :: Python :: 3.10
15
14
  Classifier: Programming Language :: Python :: 3.11
16
15
  Classifier: Programming Language :: Python :: 3.12
17
16
  Classifier: Programming Language :: Python :: 3.13
@@ -19,16 +18,13 @@ Classifier: Programming Language :: Python :: 3.14
19
18
  Classifier: Programming Language :: Python :: 3.15
20
19
  Classifier: Programming Language :: Python :: Free Threading :: 3 - Stable
21
20
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
- Requires-Python: >=3.10
21
+ Requires-Python: >=3.11
23
22
  Description-Content-Type: text/markdown
24
23
  License-File: LICENSE
25
- Requires-Dist: backports.strenum; python_version == "3.10"
26
- Requires-Dist: gnureadline>=8; platform_system == "Darwin"
24
+ Requires-Dist: prompt-toolkit>=3.0.52
27
25
  Requires-Dist: pyperclip>=1.8.2
28
- Requires-Dist: pyreadline3>=3.4; platform_system == "Windows"
29
26
  Requires-Dist: rich>=15.0.0
30
27
  Requires-Dist: rich-argparse>=1.7.2
31
- Requires-Dist: typing-extensions; python_version == "3.10"
32
28
  Dynamic: license-file
33
29
 
34
30
  <h1 align="center">cmd2 : immersive interactive command line applications</h1>
@@ -58,10 +54,11 @@ applications. It provides a simple API which is an extension of Python's built-i
58
54
  of cmd to make your life easier and eliminates much of the boilerplate code which would be necessary
59
55
  when using cmd.
60
56
 
61
- > :warning: **`cmd2` 3.0.0 has been released and there are some significant backwards
62
- > incompatibilities from version `2.x`. Please see the
63
- > [Migration Guide](https://cmd2.readthedocs.io/en/latest/upgrades/) for tips on upgrading from
64
- > `cmd2` 2.x to 3.x.**
57
+ > :warning: **If you are upgrading from an older version of `cmd2`, both `3.x` and `4.x` have some
58
+ > significant backwards incompatibilities from previous versions. Please see the
59
+ > [CHANGELOG](./CHANGELOG.md) for info on what has changed and the
60
+ > [Migration Guide](https://cmd2.readthedocs.io/en/latest/upgrades/) for tips on upgrading from an
61
+ > older version of `cmd2` to `4.x`**
65
62
 
66
63
  ## The developers toolbox
67
64
 
@@ -110,8 +107,6 @@ command line argument parsing and execution of cmd2 scripting.
110
107
  - Text file scripting of your application with `run_script` (`@`) and `_relative_run_script` (`@@`)
111
108
  - Powerful and flexible built-in Python scripting of your application using the `run_pyscript`
112
109
  command
113
- - Transcripts for use with built-in regression can be automatically generated from `history -t` or
114
- `run_script -t`
115
110
 
116
111
  ## Installation
117
112
 
@@ -121,7 +116,7 @@ On all operating systems, the latest stable version of `cmd2` can be installed u
121
116
  pip install -U cmd2
122
117
  ```
123
118
 
124
- cmd2 works with Python 3.10+ on Windows, macOS, and Linux. It is pure Python code with few 3rd-party
119
+ cmd2 works with Python 3.11+ on Windows, macOS, and Linux. It is pure Python code with few 3rd-party
125
120
  dependencies. It works with both conventional CPython and free-threaded variants.
126
121
 
127
122
  For information on other installation options, see
@@ -142,7 +137,7 @@ examples.
142
137
  - [cmd2 example applications](https://github.com/python-cmd2/cmd2/tree/main/examples)
143
138
  - Basic cmd2 examples to demonstrate how to use various features
144
139
  - [Advanced Examples](https://github.com/jayrod/cmd2-example-apps)
145
- - More complex examples that demonstrate more featuers about how to put together a complete
140
+ - More complex examples that demonstrate more features about how to put together a complete
146
141
  application
147
142
  - [Cookiecutter](https://github.com/cookiecutter/cookiecutter) Templates from community
148
143
  - Basic cookiecutter template for cmd2 application :
@@ -25,10 +25,11 @@ applications. It provides a simple API which is an extension of Python's built-i
25
25
  of cmd to make your life easier and eliminates much of the boilerplate code which would be necessary
26
26
  when using cmd.
27
27
 
28
- > :warning: **`cmd2` 3.0.0 has been released and there are some significant backwards
29
- > incompatibilities from version `2.x`. Please see the
30
- > [Migration Guide](https://cmd2.readthedocs.io/en/latest/upgrades/) for tips on upgrading from
31
- > `cmd2` 2.x to 3.x.**
28
+ > :warning: **If you are upgrading from an older version of `cmd2`, both `3.x` and `4.x` have some
29
+ > significant backwards incompatibilities from previous versions. Please see the
30
+ > [CHANGELOG](./CHANGELOG.md) for info on what has changed and the
31
+ > [Migration Guide](https://cmd2.readthedocs.io/en/latest/upgrades/) for tips on upgrading from an
32
+ > older version of `cmd2` to `4.x`**
32
33
 
33
34
  ## The developers toolbox
34
35
 
@@ -77,8 +78,6 @@ command line argument parsing and execution of cmd2 scripting.
77
78
  - Text file scripting of your application with `run_script` (`@`) and `_relative_run_script` (`@@`)
78
79
  - Powerful and flexible built-in Python scripting of your application using the `run_pyscript`
79
80
  command
80
- - Transcripts for use with built-in regression can be automatically generated from `history -t` or
81
- `run_script -t`
82
81
 
83
82
  ## Installation
84
83
 
@@ -88,7 +87,7 @@ On all operating systems, the latest stable version of `cmd2` can be installed u
88
87
  pip install -U cmd2
89
88
  ```
90
89
 
91
- cmd2 works with Python 3.10+ on Windows, macOS, and Linux. It is pure Python code with few 3rd-party
90
+ cmd2 works with Python 3.11+ on Windows, macOS, and Linux. It is pure Python code with few 3rd-party
92
91
  dependencies. It works with both conventional CPython and free-threaded variants.
93
92
 
94
93
  For information on other installation options, see
@@ -109,7 +108,7 @@ examples.
109
108
  - [cmd2 example applications](https://github.com/python-cmd2/cmd2/tree/main/examples)
110
109
  - Basic cmd2 examples to demonstrate how to use various features
111
110
  - [Advanced Examples](https://github.com/jayrod/cmd2-example-apps)
112
- - More complex examples that demonstrate more featuers about how to put together a complete
111
+ - More complex examples that demonstrate more features about how to put together a complete
113
112
  application
114
113
  - [Cookiecutter](https://github.com/cookiecutter/cookiecutter) Templates from community
115
114
  - Basic cookiecutter template for cmd2 application :
@@ -0,0 +1,127 @@
1
+ """Import certain things for backwards compatibility."""
2
+
3
+ import contextlib
4
+ import importlib.metadata as importlib_metadata
5
+
6
+ with contextlib.suppress(importlib_metadata.PackageNotFoundError):
7
+ __version__ = importlib_metadata.version(__name__)
8
+
9
+ from . import (
10
+ plugin,
11
+ rich_utils,
12
+ string_utils,
13
+ )
14
+ from .annotated import with_annotated
15
+ from .argparse_completer import set_default_argparse_completer
16
+ from .argparse_utils import (
17
+ Cmd2ArgumentParser,
18
+ SubcommandRecord,
19
+ register_argparse_argument_parameter,
20
+ set_default_argument_parser,
21
+ )
22
+ from .cmd2 import Cmd
23
+ from .colors import Color
24
+ from .command_set import CommandSet
25
+ from .completion import (
26
+ Choices,
27
+ CompletionItem,
28
+ Completions,
29
+ )
30
+ from .constants import (
31
+ COMMAND_NAME,
32
+ DEFAULT_SHORTCUTS,
33
+ )
34
+ from .decorators import (
35
+ as_subcommand_to,
36
+ with_argparser,
37
+ with_argument_list,
38
+ with_category,
39
+ )
40
+ from .exceptions import (
41
+ Cmd2ArgparseError,
42
+ CommandSetRegistrationError,
43
+ CompletionError,
44
+ PassThroughException,
45
+ SkipPostcommandHooks,
46
+ )
47
+ from .parsing import Statement
48
+ from .py_bridge import CommandResult
49
+ from .rich_utils import (
50
+ ArgumentDefaultsCmd2HelpFormatter,
51
+ Cmd2HelpFormatter,
52
+ MetavarTypeCmd2HelpFormatter,
53
+ RawDescriptionCmd2HelpFormatter,
54
+ RawTextCmd2HelpFormatter,
55
+ TextGroup,
56
+ )
57
+ from .string_utils import stylize
58
+ from .styles import Cmd2Style
59
+ from .theme import (
60
+ get_theme,
61
+ reset_theme,
62
+ update_theme,
63
+ )
64
+ from .utils import (
65
+ CustomCompletionSettings,
66
+ Settable,
67
+ categorize,
68
+ set_default_str_sort_key,
69
+ )
70
+
71
+ __all__: list[str] = [ # noqa: RUF022
72
+ "COMMAND_NAME",
73
+ "DEFAULT_SHORTCUTS",
74
+ # Argparse Exports
75
+ "Cmd2ArgumentParser",
76
+ "SubcommandRecord",
77
+ "register_argparse_argument_parameter",
78
+ "set_default_argparse_completer",
79
+ "set_default_argument_parser",
80
+ # Cmd2
81
+ "Cmd",
82
+ "CommandResult",
83
+ "CommandSet",
84
+ "Statement",
85
+ # Colors
86
+ "Color",
87
+ # Completion
88
+ "Choices",
89
+ "CompletionItem",
90
+ "Completions",
91
+ # Decorators
92
+ "with_annotated",
93
+ "with_argument_list",
94
+ "with_argparser",
95
+ "with_category",
96
+ "as_subcommand_to",
97
+ # Exceptions
98
+ "Cmd2ArgparseError",
99
+ "CommandSetRegistrationError",
100
+ "CompletionError",
101
+ "PassThroughException",
102
+ "SkipPostcommandHooks",
103
+ # modules
104
+ "plugin",
105
+ "rich_utils",
106
+ "string_utils",
107
+ # Rich Utils
108
+ "ArgumentDefaultsCmd2HelpFormatter",
109
+ "Cmd2HelpFormatter",
110
+ "MetavarTypeCmd2HelpFormatter",
111
+ "RawDescriptionCmd2HelpFormatter",
112
+ "RawTextCmd2HelpFormatter",
113
+ "TextGroup",
114
+ # String Utils
115
+ "stylize",
116
+ # Styles
117
+ "Cmd2Style",
118
+ # Theme
119
+ "get_theme",
120
+ "reset_theme",
121
+ "update_theme",
122
+ # Utilities
123
+ "categorize",
124
+ "CustomCompletionSettings",
125
+ "Settable",
126
+ "set_default_str_sort_key",
127
+ ]