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.
- {cmd2-3.3.0 → cmd2-4.0.0b1}/.pre-commit-config.yaml +1 -1
- {cmd2-3.3.0 → cmd2-4.0.0b1}/CHANGELOG.md +94 -1
- {cmd2-3.3.0 → cmd2-4.0.0b1}/Makefile +3 -1
- {cmd2-3.3.0 → cmd2-4.0.0b1}/PKG-INFO +3 -6
- {cmd2-3.3.0 → cmd2-4.0.0b1}/README.md +1 -3
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/__init__.py +11 -4
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/argparse_completer.py +351 -315
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/argparse_custom.py +123 -234
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/cmd2.py +1208 -1735
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/command_definition.py +12 -12
- cmd2-4.0.0b1/cmd2/completion.py +254 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/constants.py +4 -5
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/decorators.py +47 -52
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/exceptions.py +10 -6
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/history.py +10 -12
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/parsing.py +177 -150
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/plugin.py +2 -6
- cmd2-4.0.0b1/cmd2/pt_utils.py +305 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/py_bridge.py +3 -5
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/rich_utils.py +141 -3
- cmd2-4.0.0b1/cmd2/types.py +61 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/utils.py +48 -52
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2.egg-info/PKG-INFO +3 -6
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2.egg-info/SOURCES.txt +11 -31
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2.egg-info/requires.txt +1 -6
- cmd2-4.0.0b1/docs/api/completion.md +3 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/index.md +2 -4
- cmd2-4.0.0b1/docs/api/pt_utils.md +3 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/examples/alternate_event_loops.md +9 -1
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/examples/getting_started.md +12 -6
- cmd2-4.0.0b1/docs/features/async_commands.md +74 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/builtin_commands.md +13 -13
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/completion.md +2 -15
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/generating_output.md +0 -1
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/history.md +21 -32
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/hooks.md +3 -1
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/index.md +1 -1
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/initialization.md +3 -3
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/misc.md +0 -20
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/os.md +8 -8
- cmd2-4.0.0b1/docs/features/prompt.md +99 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/settings.md +6 -6
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/startup_commands.md +1 -1
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/migrating/incompatibilities.md +3 -3
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/migrating/why.md +6 -7
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/overview/alternatives.md +7 -11
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/overview/installation.md +0 -33
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/overview/integrating.md +0 -13
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/upgrades.md +50 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/README.md +2 -2
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/argparse_completion.py +17 -14
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/async_call.py +13 -17
- cmd2-4.0.0b1/examples/async_commands.py +143 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/async_printing.py +32 -50
- cmd2-4.0.0b1/examples/basic_completion.py +56 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/cmd_as_argument.py +1 -6
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/getting_started.py +37 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/hello_cmd2.py +5 -2
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/hooks.py +0 -2
- cmd2-4.0.0b1/examples/modular_commands/commandset_basic.py +45 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/read_input.py +4 -17
- {cmd2-3.3.0 → cmd2-4.0.0b1}/mkdocs.yml +4 -4
- {cmd2-3.3.0 → cmd2-4.0.0b1}/pyproject.toml +5 -6
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/conftest.py +0 -36
- cmd2-4.0.0b1/tests/scripts/postcmds.txt +1 -0
- cmd2-4.0.0b1/tests/scripts/precmds.txt +1 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_argparse_completer.py +282 -346
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_argparse_custom.py +20 -6
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_cmd2.py +1097 -370
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_commandset.py +33 -46
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_completion.py +375 -614
- cmd2-4.0.0b1/tests/test_dynamic_complete_style.py +75 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_history.py +48 -53
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_parsing.py +131 -201
- cmd2-4.0.0b1/tests/test_pt_utils.py +619 -0
- cmd2-4.0.0b1/tests/test_py_completion.py +54 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_rich_utils.py +50 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_run_pyscript.py +8 -8
- cmd2-3.3.0/cmd2/rl_utils.py +0 -301
- cmd2-3.3.0/cmd2/terminal_utils.py +0 -144
- cmd2-3.3.0/cmd2/transcript.py +0 -225
- cmd2-3.3.0/docs/api/rl_utils.md +0 -3
- cmd2-3.3.0/docs/api/terminal_utils.md +0 -3
- cmd2-3.3.0/docs/api/transcript.md +0 -3
- cmd2-3.3.0/docs/features/prompt.md +0 -50
- cmd2-3.3.0/docs/features/transcripts.md +0 -182
- cmd2-3.3.0/examples/basic_completion.py +0 -99
- cmd2-3.3.0/examples/modular_commands/commandset_basic.py +0 -87
- cmd2-3.3.0/examples/transcript_example.py +0 -84
- cmd2-3.3.0/examples/transcripts/exampleSession.txt +0 -14
- cmd2-3.3.0/examples/transcripts/pirate.transcript +0 -10
- cmd2-3.3.0/examples/transcripts/quit.txt +0 -1
- cmd2-3.3.0/examples/transcripts/transcript_regex.txt +0 -15
- cmd2-3.3.0/tests/scripts/postcmds.txt +0 -1
- cmd2-3.3.0/tests/scripts/precmds.txt +0 -1
- cmd2-3.3.0/tests/test_async_alert.py +0 -50
- cmd2-3.3.0/tests/test_terminal_utils.py +0 -81
- cmd2-3.3.0/tests/test_transcript.py +0 -328
- cmd2-3.3.0/tests/transcripts/bol_eol.txt +0 -6
- cmd2-3.3.0/tests/transcripts/characterclass.txt +0 -6
- cmd2-3.3.0/tests/transcripts/dotstar.txt +0 -4
- cmd2-3.3.0/tests/transcripts/extension_notation.txt +0 -4
- cmd2-3.3.0/tests/transcripts/failure.txt +0 -4
- cmd2-3.3.0/tests/transcripts/from_cmdloop.txt +0 -44
- cmd2-3.3.0/tests/transcripts/multiline_no_regex.txt +0 -6
- cmd2-3.3.0/tests/transcripts/multiline_regex.txt +0 -6
- cmd2-3.3.0/tests/transcripts/no_output.txt +0 -7
- cmd2-3.3.0/tests/transcripts/no_output_last.txt +0 -7
- cmd2-3.3.0/tests/transcripts/singleslash.txt +0 -5
- cmd2-3.3.0/tests/transcripts/slashes_escaped.txt +0 -6
- cmd2-3.3.0/tests/transcripts/slashslash.txt +0 -4
- cmd2-3.3.0/tests/transcripts/spaces.txt +0 -8
- cmd2-3.3.0/tests/transcripts/word_boundaries.txt +0 -6
- {cmd2-3.3.0 → cmd2-4.0.0b1}/.prettierignore +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/.prettierrc +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/GEMINI.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/LICENSE +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/MANIFEST.in +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/clipboard.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/colors.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/py.typed +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/string_utils.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2/styles.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2.egg-info/dependency_links.txt +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2.egg-info/top_level.txt +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/cmd2.png +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/codecov.yml +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/argparse_completer.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/argparse_custom.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/clipboard.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/cmd.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/colors.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/command_definition.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/constants.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/decorators.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/exceptions.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/history.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/parsing.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/plugin.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/py_bridge.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/rich_utils.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/string_utils.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/styles.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/api/utils.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/doc_conventions.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/examples/examples.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/examples/index.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/argument_processing.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/clipboard.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/commands.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/disable_commands.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/embedded_python_shells.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/help.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/modular_commands.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/multiline_commands.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/packaging.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/plugins.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/redirection.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/scripting.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/shortcuts_aliases_macros.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/table_creation.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/features/theme.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/index.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/javascripts/readthedocs.js +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/migrating/index.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/migrating/minimum.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/migrating/next_steps.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/mixins/index.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/mixins/mixin_template.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/overrides/main.html +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/overview/index.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/overview/resources.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/stylesheets/cmd2.css +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/docs/testing.md +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/.cmd2rc +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/argparse_example.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/cmd2_history.dat +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/color.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/command_sets.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/custom_parser.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/custom_types.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/default_categories.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/dynamic_commands.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/environment.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/event_loops.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/exit_code.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/help_categories.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/migrating.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/mixin.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/modular_commands/__init__.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/modular_commands/commandset_complex.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/modular_commands/commandset_custominit.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/modular_commands.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/paged_output.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/persistent_history.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/pretty_print.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/python_scripting.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/remove_builtin_commands.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/remove_settable.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/rich_tables.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/rich_theme.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/scripts/arg_printer.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/scripts/conditional.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/scripts/nested.txt +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/scripts/quit.txt +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/scripts/save_help_text.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/scripts/script.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/scripts/script.txt +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/tmux_launch.sh +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/tmux_split.sh +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/examples/unicode_commands.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/package.json +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/ruff.toml +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/scripts/validate_tag.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/setup.cfg +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/.cmd2rc +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/__init__.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/pyscript/echo.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/pyscript/environment.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/pyscript/help.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/pyscript/py_locals.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/pyscript/pyscript_dir.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/pyscript/raises_exception.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/pyscript/recursive.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/pyscript/self_in_py.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/pyscript/stdout_capture.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/pyscript/stop.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/relative_multiple.txt +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/script.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/script.txt +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/scripts/binary.bin +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/scripts/empty.txt +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/scripts/help.txt +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/scripts/nested.txt +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/scripts/one_down.txt +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/scripts/utf8.txt +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_argparse.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_argparse_subcommands.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_categories.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_future_annotations.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_plugin.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_string_utils.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_utils.py +0 -0
- {cmd2-3.3.0 → cmd2-4.0.0b1}/tests/test_utils_defining_class.py +0 -0
|
@@ -1,4 +1,97 @@
|
|
|
1
|
-
|
|
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 .
|
|
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
|
+
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:
|
|
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.
|
|
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.
|
|
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
|
]
|