cmd2 3.4.0__tar.gz → 4.0.0b2__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.4.0 → cmd2-4.0.0b2}/.pre-commit-config.yaml +16 -1
- cmd2-4.0.0b2/.typos.toml +5 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/CHANGELOG.md +91 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/Makefile +7 -5
- {cmd2-3.4.0 → cmd2-4.0.0b2}/PKG-INFO +4 -7
- {cmd2-3.4.0 → cmd2-4.0.0b2}/README.md +2 -4
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2/__init__.py +12 -5
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2/argparse_completer.py +377 -320
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2/argparse_custom.py +149 -245
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2/cmd2.py +1340 -1681
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2/command_definition.py +12 -12
- cmd2-4.0.0b2/cmd2/completion.py +256 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2/constants.py +4 -5
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2/decorators.py +48 -53
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2/exceptions.py +10 -6
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2/history.py +10 -12
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2/parsing.py +177 -150
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2/plugin.py +2 -6
- cmd2-4.0.0b2/cmd2/pt_utils.py +308 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2/py_bridge.py +3 -5
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2/rich_utils.py +103 -101
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2/string_utils.py +23 -0
- cmd2-4.0.0b2/cmd2/types.py +61 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2/utils.py +48 -52
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2.egg-info/PKG-INFO +4 -7
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2.egg-info/SOURCES.txt +13 -33
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2.egg-info/requires.txt +1 -6
- cmd2-4.0.0b2/docs/api/completion.md +3 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/api/index.md +2 -4
- cmd2-4.0.0b2/docs/api/pt_utils.md +3 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/doc_conventions.md +1 -1
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/examples/alternate_event_loops.md +9 -1
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/examples/getting_started.md +12 -6
- cmd2-4.0.0b2/docs/features/async_commands.md +74 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/builtin_commands.md +13 -13
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/completion.md +2 -15
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/generating_output.md +1 -2
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/history.md +21 -32
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/hooks.md +3 -1
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/index.md +1 -1
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/initialization.md +3 -3
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/misc.md +4 -20
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/os.md +8 -8
- cmd2-4.0.0b2/docs/features/prompt.md +99 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/settings.md +6 -6
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/startup_commands.md +1 -1
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/migrating/incompatibilities.md +3 -3
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/migrating/why.md +6 -7
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/overview/alternatives.md +7 -11
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/overview/installation.md +0 -33
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/overview/integrating.md +0 -13
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/upgrades.md +50 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/README.md +6 -6
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/argparse_completion.py +19 -16
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/async_call.py +13 -17
- cmd2-4.0.0b2/examples/async_commands.py +143 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/async_printing.py +32 -50
- cmd2-4.0.0b2/examples/basic_completion.py +56 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/cmd_as_argument.py +1 -6
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/command_sets.py +3 -3
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/custom_types.py +1 -1
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/getting_started.py +37 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/hello_cmd2.py +5 -2
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/hooks.py +0 -2
- cmd2-4.0.0b2/examples/modular_commands/commandset_basic.py +45 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/read_input.py +32 -18
- {cmd2-3.4.0 → cmd2-4.0.0b2}/mkdocs.yml +4 -4
- {cmd2-3.4.0 → cmd2-4.0.0b2}/pyproject.toml +7 -8
- {cmd2-3.4.0 → cmd2-4.0.0b2}/ruff.toml +1 -1
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/conftest.py +0 -36
- cmd2-4.0.0b2/tests/scripts/postcmds.txt +1 -0
- cmd2-4.0.0b2/tests/scripts/precmds.txt +1 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/test_argparse_completer.py +457 -387
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/test_argparse_custom.py +79 -18
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/test_cmd2.py +1375 -362
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/test_commandset.py +34 -47
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/test_completion.py +375 -614
- cmd2-4.0.0b2/tests/test_dynamic_complete_style.py +75 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/test_history.py +48 -53
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/test_parsing.py +131 -201
- cmd2-4.0.0b2/tests/test_pt_utils.py +626 -0
- cmd2-4.0.0b2/tests/test_py_completion.py +54 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/test_rich_utils.py +37 -38
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/test_run_pyscript.py +8 -8
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/test_string_utils.py +26 -0
- cmd2-3.4.0/cmd2/rl_utils.py +0 -301
- cmd2-3.4.0/cmd2/terminal_utils.py +0 -144
- cmd2-3.4.0/cmd2/transcript.py +0 -225
- cmd2-3.4.0/docs/api/rl_utils.md +0 -3
- cmd2-3.4.0/docs/api/terminal_utils.md +0 -3
- cmd2-3.4.0/docs/api/transcript.md +0 -3
- cmd2-3.4.0/docs/features/prompt.md +0 -50
- cmd2-3.4.0/docs/features/transcripts.md +0 -182
- cmd2-3.4.0/examples/basic_completion.py +0 -99
- cmd2-3.4.0/examples/cmd2_history.dat +0 -0
- cmd2-3.4.0/examples/modular_commands/commandset_basic.py +0 -87
- cmd2-3.4.0/examples/transcript_example.py +0 -84
- cmd2-3.4.0/examples/transcripts/exampleSession.txt +0 -14
- cmd2-3.4.0/examples/transcripts/pirate.transcript +0 -10
- cmd2-3.4.0/examples/transcripts/quit.txt +0 -1
- cmd2-3.4.0/examples/transcripts/transcript_regex.txt +0 -15
- cmd2-3.4.0/tests/scripts/postcmds.txt +0 -1
- cmd2-3.4.0/tests/scripts/precmds.txt +0 -1
- cmd2-3.4.0/tests/test_async_alert.py +0 -50
- cmd2-3.4.0/tests/test_terminal_utils.py +0 -81
- cmd2-3.4.0/tests/test_transcript.py +0 -328
- cmd2-3.4.0/tests/transcripts/bol_eol.txt +0 -6
- cmd2-3.4.0/tests/transcripts/characterclass.txt +0 -6
- cmd2-3.4.0/tests/transcripts/dotstar.txt +0 -4
- cmd2-3.4.0/tests/transcripts/extension_notation.txt +0 -4
- cmd2-3.4.0/tests/transcripts/failure.txt +0 -4
- cmd2-3.4.0/tests/transcripts/from_cmdloop.txt +0 -44
- cmd2-3.4.0/tests/transcripts/multiline_no_regex.txt +0 -6
- cmd2-3.4.0/tests/transcripts/multiline_regex.txt +0 -6
- cmd2-3.4.0/tests/transcripts/no_output.txt +0 -7
- cmd2-3.4.0/tests/transcripts/no_output_last.txt +0 -7
- cmd2-3.4.0/tests/transcripts/singleslash.txt +0 -5
- cmd2-3.4.0/tests/transcripts/slashes_escaped.txt +0 -6
- cmd2-3.4.0/tests/transcripts/slashslash.txt +0 -4
- cmd2-3.4.0/tests/transcripts/spaces.txt +0 -8
- cmd2-3.4.0/tests/transcripts/word_boundaries.txt +0 -6
- {cmd2-3.4.0 → cmd2-4.0.0b2}/.prettierignore +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/.prettierrc +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/GEMINI.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/LICENSE +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/MANIFEST.in +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2/clipboard.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2/colors.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2/py.typed +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2/styles.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2.egg-info/dependency_links.txt +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2.egg-info/top_level.txt +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/cmd2.png +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/codecov.yml +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/api/argparse_completer.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/api/argparse_custom.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/api/clipboard.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/api/cmd.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/api/colors.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/api/command_definition.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/api/constants.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/api/decorators.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/api/exceptions.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/api/history.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/api/parsing.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/api/plugin.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/api/py_bridge.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/api/rich_utils.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/api/string_utils.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/api/styles.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/api/utils.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/examples/examples.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/examples/index.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/argument_processing.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/clipboard.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/commands.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/disable_commands.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/embedded_python_shells.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/help.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/modular_commands.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/multiline_commands.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/packaging.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/plugins.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/redirection.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/scripting.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/shortcuts_aliases_macros.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/table_creation.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/features/theme.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/index.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/javascripts/readthedocs.js +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/migrating/index.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/migrating/minimum.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/migrating/next_steps.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/mixins/index.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/mixins/mixin_template.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/overrides/main.html +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/overview/index.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/overview/resources.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/stylesheets/cmd2.css +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/docs/testing.md +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/.cmd2rc +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/argparse_example.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/color.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/custom_parser.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/default_categories.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/dynamic_commands.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/environment.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/event_loops.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/exit_code.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/help_categories.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/migrating.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/mixin.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/modular_commands/__init__.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/modular_commands/commandset_complex.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/modular_commands/commandset_custominit.py +0 -0
- /cmd2-3.4.0/examples/modular_commands.py → /cmd2-4.0.0b2/examples/modular_commandsets.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/paged_output.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/persistent_history.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/pretty_print.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/python_scripting.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/remove_builtin_commands.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/remove_settable.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/rich_tables.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/rich_theme.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/scripts/arg_printer.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/scripts/conditional.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/scripts/nested.txt +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/scripts/quit.txt +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/scripts/save_help_text.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/scripts/script.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/scripts/script.txt +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/tmux_launch.sh +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/tmux_split.sh +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/examples/unicode_commands.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/package.json +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/scripts/validate_tag.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/setup.cfg +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/.cmd2rc +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/__init__.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/pyscript/echo.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/pyscript/environment.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/pyscript/help.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/pyscript/py_locals.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/pyscript/pyscript_dir.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/pyscript/raises_exception.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/pyscript/recursive.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/pyscript/self_in_py.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/pyscript/stdout_capture.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/pyscript/stop.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/relative_multiple.txt +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/script.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/script.txt +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/scripts/binary.bin +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/scripts/empty.txt +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/scripts/help.txt +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/scripts/nested.txt +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/scripts/one_down.txt +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/scripts/utf8.txt +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/test_argparse.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/test_argparse_subcommands.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/test_categories.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/test_future_annotations.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/test_plugin.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/tests/test_utils.py +0 -0
- {cmd2-3.4.0 → cmd2-4.0.0b2}/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.
|
|
17
|
+
rev: "v0.15.6"
|
|
13
18
|
hooks:
|
|
14
19
|
- id: ruff-format
|
|
15
20
|
args: [--config=ruff.toml]
|
|
@@ -23,3 +28,13 @@ repos:
|
|
|
23
28
|
additional_dependencies:
|
|
24
29
|
- prettier@3.8.1
|
|
25
30
|
- prettier-plugin-toml@2.0.6
|
|
31
|
+
|
|
32
|
+
- repo: https://github.com/crate-ci/typos
|
|
33
|
+
rev: v1.44.0
|
|
34
|
+
hooks:
|
|
35
|
+
- id: typos
|
|
36
|
+
exclude: |
|
|
37
|
+
(?x)^(
|
|
38
|
+
ruff.toml|
|
|
39
|
+
tests/.*
|
|
40
|
+
)$
|
cmd2-4.0.0b2/.typos.toml
ADDED
|
@@ -1,3 +1,94 @@
|
|
|
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_columns`.
|
|
41
|
+
- `CompletionItem.descriptive_data` is now called `CompletionItem.table_data`.
|
|
42
|
+
- Removed `DEFAULT_DESCRIPTIVE_HEADERS`. This means you must define `table_columns` when using
|
|
43
|
+
`CompletionItem.table_data` data.
|
|
44
|
+
- `Cmd.default_sort_key` moved to `utils.DEFAULT_STR_SORT_KEY`.
|
|
45
|
+
- Moved completion state data, which previously resided in `Cmd`, into other classes.
|
|
46
|
+
- `Cmd.matches_sorted` -> `Completions.is_sorted` and `Choices.is_sorted`
|
|
47
|
+
- `Cmd.completion_hint` -> `Completions.hint`
|
|
48
|
+
- `Cmd.formatted_completions` -> `Completions.table` (Now a Rich Table)
|
|
49
|
+
- `Cmd.allow_appended_space/allow_closing_quote` -> `Completions.allow_finalization`
|
|
50
|
+
- Removed `Cmd.matches_delimited` since it's no longer used.
|
|
51
|
+
- Removed `flag_based_complete` and `index_based_complete` functions since their functionality
|
|
52
|
+
is already provided in arpgarse-based completion.
|
|
53
|
+
- Changed `Statement.multiline_command` from a string to a bool.
|
|
54
|
+
- Made `Statement.arg_list` a property which generates the list on-demand.
|
|
55
|
+
- Renamed `Statement.output` to `Statement.redirector`.
|
|
56
|
+
- Renamed `Statement.output_to` to `Statement.redirect_to`.
|
|
57
|
+
- Removed `Statement.pipe_to` since it can be handled by `Statement.redirector` and
|
|
58
|
+
`Statement.redirect_to`.
|
|
59
|
+
- Changed `StatementParser.parse_command_only()` to return a `PartialStatement` object.
|
|
60
|
+
- Renamed `Macro.arg_list` to `Macro.args`.
|
|
61
|
+
- Removed `terminal_utils.py` since `prompt-toolkit` provides this functionality.
|
|
62
|
+
- Replaced `async_alert()` and `async_update_prompt()` with a single function called
|
|
63
|
+
`add_alert()`. This new function is thread-safe and does not require you to acquire a mutex
|
|
64
|
+
before calling it like the previous functions did.
|
|
65
|
+
- Removed `Cmd.default_to_shell`.
|
|
66
|
+
- Removed `Cmd.ruler` since `cmd2` no longer uses it.
|
|
67
|
+
- Enhancements
|
|
68
|
+
- New `cmd2.Cmd` parameters
|
|
69
|
+
- **auto_suggest**: (boolean) if `True`, provide fish shell style auto-suggestions. These
|
|
70
|
+
are grayed-out hints based on history. User can press right-arrow key to accept the
|
|
71
|
+
provided suggestion.
|
|
72
|
+
- **bottom toolbar**: (boolean) if `True`, present a persistent bottom toolbar capable of
|
|
73
|
+
displaying realtime status information while the prompt is displayed, see the
|
|
74
|
+
`cmd2.Cmd2.get_bottom_toolbar` method that can be overridden as well as the updated
|
|
75
|
+
`getting_started.py` example
|
|
76
|
+
- New `cmd2.Cmd` methods
|
|
77
|
+
- **get_bottom_toolbar**: populates bottom toolbar if `bottom_toolbar` is `True`
|
|
78
|
+
- **get_rprompt**: override to populate right prompt
|
|
79
|
+
- **pre_prompt**: hook method that is called before the prompt is displayed, but after
|
|
80
|
+
`prompt-toolkit` event loop has started
|
|
81
|
+
- **read_secret**: read secrets like passwords without displaying them to the terminal
|
|
82
|
+
- New settables:
|
|
83
|
+
- **max_column_completion_results**: (int) the maximum number of completion results to
|
|
84
|
+
display in a single column
|
|
85
|
+
- `cmd2.Cmd.select` has been revamped to use the
|
|
86
|
+
[choice](https://python-prompt-toolkit.readthedocs.io/en/3.0.52/pages/asking_for_a_choice.html)
|
|
87
|
+
function from `prompt-toolkit` when both **stdin** and **stdout** are TTYs
|
|
88
|
+
- Add support for Python 3.15 by fixing various bugs related to internal `argparse` changes
|
|
89
|
+
- Added `common_prefix` method to `cmd2.string_utils` module as a replacement for
|
|
90
|
+
`os.path.commonprefix` since that is now deprecated in Python 3.15
|
|
91
|
+
|
|
1
92
|
## 3.4.0 (March 3, 2026)
|
|
2
93
|
|
|
3
94
|
- Enhancements
|
|
@@ -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
|
|
11
|
-
@uv run
|
|
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
|
|
20
|
-
@uv run
|
|
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 .
|
|
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.0b2
|
|
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
|
|
|
@@ -142,7 +139,7 @@ examples.
|
|
|
142
139
|
- [cmd2 example applications](https://github.com/python-cmd2/cmd2/tree/main/examples)
|
|
143
140
|
- Basic cmd2 examples to demonstrate how to use various features
|
|
144
141
|
- [Advanced Examples](https://github.com/jayrod/cmd2-example-apps)
|
|
145
|
-
- More complex examples that demonstrate more
|
|
142
|
+
- More complex examples that demonstrate more features about how to put together a complete
|
|
146
143
|
application
|
|
147
144
|
- [Cookiecutter](https://github.com/cookiecutter/cookiecutter) Templates from community
|
|
148
145
|
- Basic cookiecutter template for cmd2 application :
|
|
@@ -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
|
|
|
@@ -109,7 +107,7 @@ examples.
|
|
|
109
107
|
- [cmd2 example applications](https://github.com/python-cmd2/cmd2/tree/main/examples)
|
|
110
108
|
- Basic cmd2 examples to demonstrate how to use various features
|
|
111
109
|
- [Advanced Examples](https://github.com/jayrod/cmd2-example-apps)
|
|
112
|
-
- More complex examples that demonstrate more
|
|
110
|
+
- More complex examples that demonstrate more features about how to put together a complete
|
|
113
111
|
application
|
|
114
112
|
- [Cookiecutter](https://github.com/cookiecutter/cookiecutter) Templates from community
|
|
115
113
|
- Basic cookiecutter template for cmd2 application :
|
|
@@ -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',
|
|
@@ -92,10 +99,10 @@ __all__: list[str] = [ # noqa: RUF022
|
|
|
92
99
|
# String Utils
|
|
93
100
|
'stylize',
|
|
94
101
|
# Styles,
|
|
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
|
]
|