cmd2 3.3.0__tar.gz → 4.0.0b1__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 (244) hide show
  1. {cmd2-3.3.0 → cmd2-4.0.0b1}/.pre-commit-config.yaml +1 -1
  2. {cmd2-3.3.0 → cmd2-4.0.0b1}/CHANGELOG.md +94 -1
  3. {cmd2-3.3.0 → cmd2-4.0.0b1}/Makefile +3 -1
  4. {cmd2-3.3.0 → cmd2-4.0.0b1}/PKG-INFO +3 -6
  5. {cmd2-3.3.0 → cmd2-4.0.0b1}/README.md +1 -3
  6. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/__init__.py +11 -4
  7. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/argparse_completer.py +351 -315
  8. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/argparse_custom.py +123 -234
  9. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/cmd2.py +1208 -1735
  10. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/command_definition.py +12 -12
  11. cmd2-4.0.0b1/cmd2/completion.py +254 -0
  12. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/constants.py +4 -5
  13. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/decorators.py +47 -52
  14. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/exceptions.py +10 -6
  15. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/history.py +10 -12
  16. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/parsing.py +177 -150
  17. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/plugin.py +2 -6
  18. cmd2-4.0.0b1/cmd2/pt_utils.py +305 -0
  19. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/py_bridge.py +3 -5
  20. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/rich_utils.py +141 -3
  21. cmd2-4.0.0b1/cmd2/types.py +61 -0
  22. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/utils.py +48 -52
  23. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2.egg-info/PKG-INFO +3 -6
  24. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2.egg-info/SOURCES.txt +11 -31
  25. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2.egg-info/requires.txt +1 -6
  26. cmd2-4.0.0b1/docs/api/completion.md +3 -0
  27. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/index.md +2 -4
  28. cmd2-4.0.0b1/docs/api/pt_utils.md +3 -0
  29. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/examples/alternate_event_loops.md +9 -1
  30. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/examples/getting_started.md +12 -6
  31. cmd2-4.0.0b1/docs/features/async_commands.md +74 -0
  32. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/builtin_commands.md +13 -13
  33. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/completion.md +2 -15
  34. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/generating_output.md +0 -1
  35. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/history.md +21 -32
  36. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/hooks.md +3 -1
  37. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/index.md +1 -1
  38. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/initialization.md +3 -3
  39. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/misc.md +0 -20
  40. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/os.md +8 -8
  41. cmd2-4.0.0b1/docs/features/prompt.md +99 -0
  42. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/settings.md +6 -6
  43. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/startup_commands.md +1 -1
  44. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/migrating/incompatibilities.md +3 -3
  45. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/migrating/why.md +6 -7
  46. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/overview/alternatives.md +7 -11
  47. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/overview/installation.md +0 -33
  48. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/overview/integrating.md +0 -13
  49. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/upgrades.md +50 -0
  50. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/README.md +2 -2
  51. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/argparse_completion.py +17 -14
  52. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/async_call.py +13 -17
  53. cmd2-4.0.0b1/examples/async_commands.py +143 -0
  54. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/async_printing.py +32 -50
  55. cmd2-4.0.0b1/examples/basic_completion.py +56 -0
  56. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/cmd_as_argument.py +1 -6
  57. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/getting_started.py +37 -0
  58. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/hello_cmd2.py +5 -2
  59. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/hooks.py +0 -2
  60. cmd2-4.0.0b1/examples/modular_commands/commandset_basic.py +45 -0
  61. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/read_input.py +4 -17
  62. {cmd2-3.3.0 → cmd2-4.0.0b1}/mkdocs.yml +4 -4
  63. {cmd2-3.3.0 → cmd2-4.0.0b1}/pyproject.toml +5 -6
  64. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/conftest.py +0 -36
  65. cmd2-4.0.0b1/tests/scripts/postcmds.txt +1 -0
  66. cmd2-4.0.0b1/tests/scripts/precmds.txt +1 -0
  67. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_argparse_completer.py +282 -346
  68. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_argparse_custom.py +20 -6
  69. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_cmd2.py +1097 -370
  70. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_commandset.py +33 -46
  71. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_completion.py +375 -614
  72. cmd2-4.0.0b1/tests/test_dynamic_complete_style.py +75 -0
  73. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_history.py +48 -53
  74. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_parsing.py +131 -201
  75. cmd2-4.0.0b1/tests/test_pt_utils.py +619 -0
  76. cmd2-4.0.0b1/tests/test_py_completion.py +54 -0
  77. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_rich_utils.py +50 -0
  78. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_run_pyscript.py +8 -8
  79. cmd2-3.3.0/cmd2/rl_utils.py +0 -301
  80. cmd2-3.3.0/cmd2/terminal_utils.py +0 -144
  81. cmd2-3.3.0/cmd2/transcript.py +0 -225
  82. cmd2-3.3.0/docs/api/rl_utils.md +0 -3
  83. cmd2-3.3.0/docs/api/terminal_utils.md +0 -3
  84. cmd2-3.3.0/docs/api/transcript.md +0 -3
  85. cmd2-3.3.0/docs/features/prompt.md +0 -50
  86. cmd2-3.3.0/docs/features/transcripts.md +0 -182
  87. cmd2-3.3.0/examples/basic_completion.py +0 -99
  88. cmd2-3.3.0/examples/modular_commands/commandset_basic.py +0 -87
  89. cmd2-3.3.0/examples/transcript_example.py +0 -84
  90. cmd2-3.3.0/examples/transcripts/exampleSession.txt +0 -14
  91. cmd2-3.3.0/examples/transcripts/pirate.transcript +0 -10
  92. cmd2-3.3.0/examples/transcripts/quit.txt +0 -1
  93. cmd2-3.3.0/examples/transcripts/transcript_regex.txt +0 -15
  94. cmd2-3.3.0/tests/scripts/postcmds.txt +0 -1
  95. cmd2-3.3.0/tests/scripts/precmds.txt +0 -1
  96. cmd2-3.3.0/tests/test_async_alert.py +0 -50
  97. cmd2-3.3.0/tests/test_terminal_utils.py +0 -81
  98. cmd2-3.3.0/tests/test_transcript.py +0 -328
  99. cmd2-3.3.0/tests/transcripts/bol_eol.txt +0 -6
  100. cmd2-3.3.0/tests/transcripts/characterclass.txt +0 -6
  101. cmd2-3.3.0/tests/transcripts/dotstar.txt +0 -4
  102. cmd2-3.3.0/tests/transcripts/extension_notation.txt +0 -4
  103. cmd2-3.3.0/tests/transcripts/failure.txt +0 -4
  104. cmd2-3.3.0/tests/transcripts/from_cmdloop.txt +0 -44
  105. cmd2-3.3.0/tests/transcripts/multiline_no_regex.txt +0 -6
  106. cmd2-3.3.0/tests/transcripts/multiline_regex.txt +0 -6
  107. cmd2-3.3.0/tests/transcripts/no_output.txt +0 -7
  108. cmd2-3.3.0/tests/transcripts/no_output_last.txt +0 -7
  109. cmd2-3.3.0/tests/transcripts/singleslash.txt +0 -5
  110. cmd2-3.3.0/tests/transcripts/slashes_escaped.txt +0 -6
  111. cmd2-3.3.0/tests/transcripts/slashslash.txt +0 -4
  112. cmd2-3.3.0/tests/transcripts/spaces.txt +0 -8
  113. cmd2-3.3.0/tests/transcripts/word_boundaries.txt +0 -6
  114. {cmd2-3.3.0 → cmd2-4.0.0b1}/.prettierignore +0 -0
  115. {cmd2-3.3.0 → cmd2-4.0.0b1}/.prettierrc +0 -0
  116. {cmd2-3.3.0 → cmd2-4.0.0b1}/GEMINI.md +0 -0
  117. {cmd2-3.3.0 → cmd2-4.0.0b1}/LICENSE +0 -0
  118. {cmd2-3.3.0 → cmd2-4.0.0b1}/MANIFEST.in +0 -0
  119. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/clipboard.py +0 -0
  120. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/colors.py +0 -0
  121. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/py.typed +0 -0
  122. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/string_utils.py +0 -0
  123. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/styles.py +0 -0
  124. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2.egg-info/dependency_links.txt +0 -0
  125. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2.egg-info/top_level.txt +0 -0
  126. {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2.png +0 -0
  127. {cmd2-3.3.0 → cmd2-4.0.0b1}/codecov.yml +0 -0
  128. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/argparse_completer.md +0 -0
  129. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/argparse_custom.md +0 -0
  130. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/clipboard.md +0 -0
  131. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/cmd.md +0 -0
  132. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/colors.md +0 -0
  133. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/command_definition.md +0 -0
  134. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/constants.md +0 -0
  135. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/decorators.md +0 -0
  136. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/exceptions.md +0 -0
  137. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/history.md +0 -0
  138. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/parsing.md +0 -0
  139. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/plugin.md +0 -0
  140. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/py_bridge.md +0 -0
  141. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/rich_utils.md +0 -0
  142. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/string_utils.md +0 -0
  143. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/styles.md +0 -0
  144. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/utils.md +0 -0
  145. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/doc_conventions.md +0 -0
  146. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/examples/examples.md +0 -0
  147. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/examples/index.md +0 -0
  148. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/argument_processing.md +0 -0
  149. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/clipboard.md +0 -0
  150. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/commands.md +0 -0
  151. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/disable_commands.md +0 -0
  152. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/embedded_python_shells.md +0 -0
  153. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/help.md +0 -0
  154. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/modular_commands.md +0 -0
  155. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/multiline_commands.md +0 -0
  156. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/packaging.md +0 -0
  157. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/plugins.md +0 -0
  158. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/redirection.md +0 -0
  159. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/scripting.md +0 -0
  160. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/shortcuts_aliases_macros.md +0 -0
  161. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/table_creation.md +0 -0
  162. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/theme.md +0 -0
  163. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/index.md +0 -0
  164. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/javascripts/readthedocs.js +0 -0
  165. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/migrating/index.md +0 -0
  166. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/migrating/minimum.md +0 -0
  167. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/migrating/next_steps.md +0 -0
  168. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/mixins/index.md +0 -0
  169. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/mixins/mixin_template.md +0 -0
  170. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/overrides/main.html +0 -0
  171. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/overview/index.md +0 -0
  172. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/overview/resources.md +0 -0
  173. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/stylesheets/cmd2.css +0 -0
  174. {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/testing.md +0 -0
  175. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/.cmd2rc +0 -0
  176. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/argparse_example.py +0 -0
  177. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/cmd2_history.dat +0 -0
  178. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/color.py +0 -0
  179. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/command_sets.py +0 -0
  180. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/custom_parser.py +0 -0
  181. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/custom_types.py +0 -0
  182. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/default_categories.py +0 -0
  183. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/dynamic_commands.py +0 -0
  184. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/environment.py +0 -0
  185. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/event_loops.py +0 -0
  186. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/exit_code.py +0 -0
  187. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/help_categories.py +0 -0
  188. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/migrating.py +0 -0
  189. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/mixin.py +0 -0
  190. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/modular_commands/__init__.py +0 -0
  191. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/modular_commands/commandset_complex.py +0 -0
  192. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/modular_commands/commandset_custominit.py +0 -0
  193. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/modular_commands.py +0 -0
  194. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/paged_output.py +0 -0
  195. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/persistent_history.py +0 -0
  196. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/pretty_print.py +0 -0
  197. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/python_scripting.py +0 -0
  198. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/remove_builtin_commands.py +0 -0
  199. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/remove_settable.py +0 -0
  200. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/rich_tables.py +0 -0
  201. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/rich_theme.py +0 -0
  202. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/scripts/arg_printer.py +0 -0
  203. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/scripts/conditional.py +0 -0
  204. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/scripts/nested.txt +0 -0
  205. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/scripts/quit.txt +0 -0
  206. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/scripts/save_help_text.py +0 -0
  207. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/scripts/script.py +0 -0
  208. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/scripts/script.txt +0 -0
  209. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/tmux_launch.sh +0 -0
  210. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/tmux_split.sh +0 -0
  211. {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/unicode_commands.py +0 -0
  212. {cmd2-3.3.0 → cmd2-4.0.0b1}/package.json +0 -0
  213. {cmd2-3.3.0 → cmd2-4.0.0b1}/ruff.toml +0 -0
  214. {cmd2-3.3.0 → cmd2-4.0.0b1}/scripts/validate_tag.py +0 -0
  215. {cmd2-3.3.0 → cmd2-4.0.0b1}/setup.cfg +0 -0
  216. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/.cmd2rc +0 -0
  217. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/__init__.py +0 -0
  218. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/pyscript/echo.py +0 -0
  219. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/pyscript/environment.py +0 -0
  220. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/pyscript/help.py +0 -0
  221. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/pyscript/py_locals.py +0 -0
  222. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/pyscript/pyscript_dir.py +0 -0
  223. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/pyscript/raises_exception.py +0 -0
  224. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/pyscript/recursive.py +0 -0
  225. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/pyscript/self_in_py.py +0 -0
  226. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/pyscript/stdout_capture.py +0 -0
  227. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/pyscript/stop.py +0 -0
  228. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/relative_multiple.txt +0 -0
  229. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/script.py +0 -0
  230. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/script.txt +0 -0
  231. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/scripts/binary.bin +0 -0
  232. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/scripts/empty.txt +0 -0
  233. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/scripts/help.txt +0 -0
  234. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/scripts/nested.txt +0 -0
  235. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/scripts/one_down.txt +0 -0
  236. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/scripts/utf8.txt +0 -0
  237. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_argparse.py +0 -0
  238. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_argparse_subcommands.py +0 -0
  239. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_categories.py +0 -0
  240. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_future_annotations.py +0 -0
  241. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_plugin.py +0 -0
  242. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_string_utils.py +0 -0
  243. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_utils.py +0 -0
  244. {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_utils_defining_class.py +0 -0
@@ -9,7 +9,7 @@ repos:
9
9
  - id: trailing-whitespace
10
10
 
11
11
  - repo: https://github.com/astral-sh/ruff-pre-commit
12
- rev: "v0.15.0"
12
+ rev: "v0.15.4"
13
13
  hooks:
14
14
  - id: ruff-format
15
15
  args: [--config=ruff.toml]
@@ -1,4 +1,97 @@
1
- # 3.3.0 (March 1, 2026)
1
+ ## 4.0.0 (TBD 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
+ - Removed **Transcript Testing** feature set along with the `history -t` option for generating
26
+ transcript files and the `cmd2.transcript` module
27
+ - This was an extremely brittle regression testing framework which should never have been
28
+ built into cmd2
29
+ - We recommend using [pytest](https://docs.pytest.org/) for unit and integration tests and
30
+ [Robot Framework](https://robotframework.org/) for acceptance tests. Both of these
31
+ frameworks can be used to create tests which are far more reliable and less brittle.
32
+ - Async specific: `prompt-toolkit` starts its own `asyncio` event loop in every `cmd2`
33
+ application
34
+ - Removed `cmd2.Cmd.terminal_lock` as it is no longer required to support things like
35
+ `cmd2.Cmd.async_alert`
36
+ - Removed `cmd2.Cmd.async_refresh_prompt` and `cmd2.Cmd.need_prompt_refresh` as they are no
37
+ longer needed
38
+ - `completer` functions must now return a `cmd2.Completions` object instead of `list[str]`.
39
+ - `choices_provider` functions must now return a `cmd2.Choices` object instead of `list[str]`.
40
+ - An argparse argument's `descriptive_headers` field is now called `table_header`.
41
+ - `CompletionItem.descriptive_data` is now called `CompletionItem.table_row`.
42
+ - `Cmd.default_sort_key` moved to `utils.DEFAULT_STR_SORT_KEY`.
43
+ - Moved completion state data, which previously resided in `Cmd`, into other classes.
44
+ - `Cmd.matches_sorted` -> `Completions.is_sorted` and `Choices.is_sorted`
45
+ - `Cmd.completion_hint` -> `Completions.completion_hint`
46
+ - `Cmd.formatted_completions` -> `Completions.completion_table`
47
+ - `Cmd.allow_appended_space/allow_closing_quote` -> `Completions.allow_finalization`
48
+ - Removed `Cmd.matches_delimited` since it's no longer used.
49
+ - Removed `flag_based_complete` and `index_based_complete` functions since their functionality
50
+ is already provided in arpgarse-based completion.
51
+ - Changed `Statement.multiline_command` from a string to a bool.
52
+ - Made `Statement.arg_list` a property which generates the list on-demand.
53
+ - Renamed `Statement.output` to `Statement.redirector`.
54
+ - Renamed `Statement.output_to` to `Statement.redirect_to`.
55
+ - Removed `Statement.pipe_to` since it can be handled by `Statement.redirector` and
56
+ `Statement.redirect_to`.
57
+ - Changed `StatementParser.parse_command_only()` to return a `PartialStatement` object.
58
+ - Renamed `Macro.arg_list` to `Macro.args`.
59
+ - Removed `terminal_utils.py` since `prompt-toolkit` provides this functionality.
60
+ - Replaced `async_alert()` and `async_update_prompt()` with a single function called
61
+ `add_alert()`. This new function is thread-safe and does not require you to acquire a mutex
62
+ before calling it like the previous functions did.
63
+ - Removed `Cmd.default_to_shell`.
64
+ - Enhancements
65
+ - New `cmd2.Cmd` parameters
66
+ - **auto_suggest**: (boolean) if `True`, provide fish shell style auto-suggestions. These
67
+ are grayed-out hints based on history. User can press right-arrow key to accept the
68
+ provided suggestion.
69
+ - **bottom toolbar**: (boolean) if `True`, present a persistent bottom toolbar capable of
70
+ displaying realtime status information while the prompt is displayed, see the
71
+ `cmd2.Cmd2.get_bottom_toolbar` method that can be overridden as well as the updated
72
+ `getting_started.py` example
73
+ - New `cmd2.Cmd` methods
74
+ - **get_bottom_toolbar**: populates bottom toolbar if `bottom_toolbar` is `True`
75
+ - **get_rprompt**: override to populate right prompt
76
+ - **pre_prompt**: hook method that is called before the prompt is displayed, but after
77
+ `prompt-toolkit` event loop has started
78
+ - New settables:
79
+ - **max_column_completion_results**: (int) the maximum number of completion results to
80
+ display in a single column
81
+
82
+ ## 3.4.0 (March 3, 2026)
83
+
84
+ - Enhancements
85
+ - Moved cmd2-specific printing logic from `Cmd.print_to()` into `Cmd2BaseConsole.print()` and
86
+ `Cmd2BaseConsole.log()`. This removes need to pass a console object to `Cmd.print_to()`.
87
+ - Addressed a bug in `rich.console.Console` where complex renderables (like `Table` and `Rule`)
88
+ may not receive formatting settings passed to `console.print()` and `console.log()`.
89
+
90
+ - Breaking Changes
91
+ - Renamed the `destination` parameter of `Cmd.print_to()` back to `file` since you can no longer
92
+ pass in a console.
93
+
94
+ ## 3.3.0 (March 1, 2026)
2
95
 
3
96
  - Enhancements
4
97
  - Added ability to pass a console object to `Cmd.print_to()`. This provides support for things
@@ -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.3.0
3
+ Version: 4.0.0b1
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
@@ -23,9 +23,8 @@ Requires-Python: >=3.10
23
23
  Description-Content-Type: text/markdown
24
24
  License-File: LICENSE
25
25
  Requires-Dist: backports.strenum; python_version == "3.10"
26
- Requires-Dist: gnureadline>=8; platform_system == "Darwin"
26
+ Requires-Dist: prompt-toolkit>=3.0.52
27
27
  Requires-Dist: pyperclip>=1.8.2
28
- Requires-Dist: pyreadline3>=3.4; platform_system == "Windows"
29
28
  Requires-Dist: rich>=14.3.0
30
29
  Requires-Dist: rich-argparse>=1.7.1
31
30
  Requires-Dist: typing-extensions; python_version == "3.10"
@@ -58,7 +57,7 @@ applications. It provides a simple API which is an extension of Python's built-i
58
57
  of cmd to make your life easier and eliminates much of the boilerplate code which would be necessary
59
58
  when using cmd.
60
59
 
61
- > :warning: **`cmd2` 3.0.0 has been released and there are some significant backwards
60
+ > :warning: **`cmd2` `3.x` has been released and there are some significant backwards
62
61
  > incompatibilities from version `2.x`. Please see the
63
62
  > [Migration Guide](https://cmd2.readthedocs.io/en/latest/upgrades/) for tips on upgrading from
64
63
  > `cmd2` 2.x to 3.x.**
@@ -110,8 +109,6 @@ command line argument parsing and execution of cmd2 scripting.
110
109
  - Text file scripting of your application with `run_script` (`@`) and `_relative_run_script` (`@@`)
111
110
  - Powerful and flexible built-in Python scripting of your application using the `run_pyscript`
112
111
  command
113
- - Transcripts for use with built-in regression can be automatically generated from `history -t` or
114
- `run_script -t`
115
112
 
116
113
  ## Installation
117
114
 
@@ -25,7 +25,7 @@ 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
28
+ > :warning: **`cmd2` `3.x` has been released and there are some significant backwards
29
29
  > incompatibilities from version `2.x`. Please see the
30
30
  > [Migration Guide](https://cmd2.readthedocs.io/en/latest/upgrades/) for tips on upgrading from
31
31
  > `cmd2` 2.x to 3.x.**
@@ -77,8 +77,6 @@ command line argument parsing and execution of cmd2 scripting.
77
77
  - Text file scripting of your application with `run_script` (`@`) and `_relative_run_script` (`@@`)
78
78
  - Powerful and flexible built-in Python scripting of your application using the `run_pyscript`
79
79
  command
80
- - Transcripts for use with built-in regression can be automatically generated from `history -t` or
81
- `run_script -t`
82
80
 
83
81
  ## Installation
84
82
 
@@ -15,7 +15,6 @@ from .argparse_completer import set_default_ap_completer_type
15
15
  from .argparse_custom import (
16
16
  Cmd2ArgumentParser,
17
17
  Cmd2AttributeWrapper,
18
- CompletionItem,
19
18
  register_argparse_argument_parameter,
20
19
  set_default_argument_parser_type,
21
20
  )
@@ -25,6 +24,11 @@ from .command_definition import (
25
24
  CommandSet,
26
25
  with_default_category,
27
26
  )
27
+ from .completion import (
28
+ Choices,
29
+ CompletionItem,
30
+ Completions,
31
+ )
28
32
  from .constants import (
29
33
  COMMAND_NAME,
30
34
  DEFAULT_SHORTCUTS,
@@ -48,10 +52,10 @@ from .rich_utils import RichPrintKwargs
48
52
  from .string_utils import stylize
49
53
  from .styles import Cmd2Style
50
54
  from .utils import (
51
- CompletionMode,
52
55
  CustomCompletionSettings,
53
56
  Settable,
54
57
  categorize,
58
+ set_default_str_sort_key,
55
59
  )
56
60
 
57
61
  __all__: list[str] = [ # noqa: RUF022
@@ -60,7 +64,6 @@ __all__: list[str] = [ # noqa: RUF022
60
64
  # Argparse Exports
61
65
  'Cmd2ArgumentParser',
62
66
  'Cmd2AttributeWrapper',
63
- 'CompletionItem',
64
67
  'register_argparse_argument_parameter',
65
68
  'set_default_ap_completer_type',
66
69
  'set_default_argument_parser_type',
@@ -71,6 +74,10 @@ __all__: list[str] = [ # noqa: RUF022
71
74
  'Statement',
72
75
  # Colors
73
76
  "Color",
77
+ # Completion
78
+ 'Choices',
79
+ 'CompletionItem',
80
+ 'Completions',
74
81
  # Decorators
75
82
  'with_argument_list',
76
83
  'with_argparser',
@@ -95,7 +102,7 @@ __all__: list[str] = [ # noqa: RUF022
95
102
  "Cmd2Style",
96
103
  # Utilities
97
104
  'categorize',
98
- 'CompletionMode',
99
105
  'CustomCompletionSettings',
100
106
  'Settable',
107
+ 'set_default_str_sort_key',
101
108
  ]