cmd2 4.0.0b6__tar.gz → 4.0.0rc2__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-4.0.0b6 → cmd2-4.0.0rc2}/.pre-commit-config.yaml +3 -3
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/CHANGELOG.md +44 -11
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/PKG-INFO +8 -10
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/README.md +6 -5
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/__init__.py +18 -9
- cmd2-4.0.0rc2/cmd2/annotated.py +2344 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/argparse_completer.py +16 -19
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/argparse_utils.py +217 -55
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/cmd2.py +214 -175
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/colors.py +1 -6
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/completion.py +3 -10
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/constants.py +8 -17
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/decorators.py +139 -65
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/parsing.py +2 -7
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/pt_utils.py +104 -35
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/py_bridge.py +12 -12
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/rich_utils.py +52 -67
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/styles.py +24 -7
- cmd2-4.0.0rc2/cmd2/theme.py +302 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/utils.py +33 -18
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2.egg-info/PKG-INFO +8 -10
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2.egg-info/SOURCES.txt +8 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2.egg-info/requires.txt +0 -4
- cmd2-4.0.0rc2/docs/api/annotated.md +3 -0
- cmd2-4.0.0rc2/docs/features/annotated.md +463 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/argument_processing.md +20 -6
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/builtin_commands.md +0 -1
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/completion.md +7 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/generating_output.md +7 -7
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/index.md +1 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/initialization.md +0 -1
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/modular_commands.md +4 -9
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/settings.md +2 -11
- cmd2-4.0.0rc2/docs/features/theme.md +29 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/overview/installation.md +2 -2
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/upgrades.md +11 -1
- cmd2-4.0.0rc2/examples/annotated_example.py +545 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/argparse_example.py +6 -6
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/async_call.py +1 -3
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/async_commands.py +9 -7
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/async_printing.py +6 -3
- cmd2-4.0.0rc2/examples/cmd2_history.dat +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/cmd_as_argument.py +12 -8
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/command_sets.py +5 -10
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/completion_item_choices.py +2 -3
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/custom_parser.py +5 -6
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/migrating.py +11 -7
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/paged_output.py +2 -2
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/read_input.py +1 -1
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/rich_theme.py +14 -5
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/scripts/save_help_text.py +1 -1
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/mkdocs.yml +11 -8
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/pyproject.toml +1 -4
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/ruff.toml +2 -4
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/conftest.py +3 -3
- cmd2-4.0.0rc2/tests/test_annotated.py +3443 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/test_argparse.py +28 -20
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/test_argparse_completer.py +20 -14
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/test_argparse_utils.py +175 -33
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/test_cmd2.py +126 -86
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/test_commandset.py +23 -54
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/test_completion.py +98 -98
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/test_pt_utils.py +236 -16
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/test_rich_utils.py +25 -32
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/test_run_pyscript.py +2 -2
- cmd2-4.0.0rc2/tests/test_theme.py +344 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/test_utils.py +60 -1
- cmd2-4.0.0b6/docs/features/theme.md +0 -10
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/.prettierignore +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/.prettierrc +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/.typos.toml +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/GEMINI.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/LICENSE +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/MANIFEST.in +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/Makefile +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/clipboard.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/command_set.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/exceptions.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/history.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/plugin.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/py.typed +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/string_utils.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2/types.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2.egg-info/dependency_links.txt +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2.egg-info/top_level.txt +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/cmd2.png +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/codecov.yml +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/api/argparse_completer.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/api/argparse_utils.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/api/clipboard.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/api/cmd.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/api/colors.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/api/command_set.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/api/completion.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/api/constants.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/api/decorators.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/api/exceptions.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/api/history.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/api/index.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/api/parsing.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/api/plugin.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/api/pt_utils.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/api/py_bridge.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/api/rich_utils.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/api/string_utils.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/api/styles.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/api/utils.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/doc_conventions.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/examples/alternate_event_loops.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/examples/examples.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/examples/getting_started.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/examples/index.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/async_commands.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/clipboard.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/commands.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/disable_commands.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/embedded_python_shells.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/help.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/history.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/hooks.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/misc.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/multiline_commands.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/os.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/packaging.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/plugins.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/prompt.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/redirection.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/scripting.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/shortcuts_aliases_macros.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/startup_commands.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/features/table_creation.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/index.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/javascripts/readthedocs.js +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/migrating/incompatibilities.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/migrating/index.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/migrating/minimum.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/migrating/next_steps.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/migrating/why.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/mixins/index.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/mixins/mixin_template.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/overrides/main.html +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/overview/alternatives.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/overview/index.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/overview/integrating.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/overview/resources.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/stylesheets/cmd2.css +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/docs/testing.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/.cmd2rc +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/README.md +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/argparse_completion.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/basic_completion.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/color.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/custom_types.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/default_categories.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/dynamic_commands.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/environment.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/event_loops.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/exit_code.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/getting_started.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/hello_cmd2.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/help_categories.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/hooks.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/mixin.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/modular_commands/__init__.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/modular_commands/commandset_basic.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/modular_commands/commandset_complex.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/modular_commands/commandset_custominit.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/modular_commandsets.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/persistent_history.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/pretty_print.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/python_scripting.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/remove_builtin_commands.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/remove_settable.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/rich_tables.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/scripts/arg_printer.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/scripts/conditional.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/scripts/nested.txt +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/scripts/quit.txt +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/scripts/script.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/scripts/script.txt +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/tmux_launch.sh +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/tmux_split.sh +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/examples/unicode_commands.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/package.json +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/scripts/validate_tag.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/setup.cfg +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/.cmd2rc +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/__init__.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/pyscript/echo.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/pyscript/environment.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/pyscript/help.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/pyscript/py_locals.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/pyscript/pyscript_dir.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/pyscript/raises_exception.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/pyscript/recursive.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/pyscript/self_in_py.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/pyscript/stop.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/pyscript/test_print.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/relative_multiple.txt +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/script.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/script.txt +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/scripts/binary.bin +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/scripts/empty.txt +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/scripts/help.txt +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/scripts/nested.txt +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/scripts/one_down.txt +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/scripts/postcmds.txt +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/scripts/precmds.txt +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/scripts/utf8.txt +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/test_argparse_subcommands.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/test_categories.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/test_dynamic_complete_style.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/test_future_annotations.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/test_history.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/test_parsing.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/test_plugin.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/test_py_completion.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/test_string_utils.py +0 -0
- {cmd2-4.0.0b6 → cmd2-4.0.0rc2}/tests/test_utils_defining_class.py +0 -0
|
@@ -14,7 +14,7 @@ repos:
|
|
|
14
14
|
- id: trailing-whitespace
|
|
15
15
|
|
|
16
16
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
17
|
-
rev: "v0.15.
|
|
17
|
+
rev: "v0.15.15"
|
|
18
18
|
hooks:
|
|
19
19
|
- id: ruff-format
|
|
20
20
|
args: [--config=ruff.toml]
|
|
@@ -26,11 +26,11 @@ repos:
|
|
|
26
26
|
hooks:
|
|
27
27
|
- id: prettier
|
|
28
28
|
additional_dependencies:
|
|
29
|
-
- prettier@3.8.
|
|
29
|
+
- prettier@3.8.3
|
|
30
30
|
- prettier-plugin-toml@2.0.6
|
|
31
31
|
|
|
32
32
|
- repo: https://github.com/crate-ci/typos
|
|
33
|
-
rev: v1.
|
|
33
|
+
rev: v1.47.0
|
|
34
34
|
hooks:
|
|
35
35
|
- id: typos
|
|
36
36
|
exclude: |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## 4.0.0 (TBD 2026)
|
|
1
|
+
## 4.0.0 (June TBD, 2026)
|
|
2
2
|
|
|
3
3
|
### Summary
|
|
4
4
|
|
|
@@ -22,6 +22,7 @@ prompt is displayed.
|
|
|
22
22
|
each platform and provided utility functions related to `readline`
|
|
23
23
|
- Added a dependency on `prompt-toolkit` and a new `cmd2.pt_utils` module with supporting
|
|
24
24
|
utilities
|
|
25
|
+
- Dropped support for Python 3.10. `cmd2` now requires Python 3.11 or later
|
|
25
26
|
- Removed **Transcript Testing** feature set along with the `history -t` option for generating
|
|
26
27
|
transcript files and the `cmd2.transcript` module
|
|
27
28
|
- This was an extremely brittle regression testing framework which should never have been
|
|
@@ -66,12 +67,14 @@ prompt is displayed.
|
|
|
66
67
|
- Removed `Cmd.ruler` since `cmd2` no longer uses it.
|
|
67
68
|
- All parsers used with `cmd2` commands must be an instance of `Cmd2ArgumentParser` or a child
|
|
68
69
|
class of it.
|
|
69
|
-
-
|
|
70
|
-
|
|
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`.
|
|
71
74
|
- Moved `set_parser_prog()` to `Cmd2ArgumentParser.update_prog()`.
|
|
72
|
-
- Renamed `cmd2_handler` to `
|
|
75
|
+
- Renamed `cmd2_handler` to `cmd2_subcommand_func` in the `argparse.Namespace` for clarity.
|
|
73
76
|
- Removed `Cmd2AttributeWrapper` class. `argparse.Namespace` objects passed to command functions
|
|
74
|
-
now contain direct attributes for `cmd2_statement` and `
|
|
77
|
+
now contain direct attributes for `cmd2_statement` and `cmd2_subcommand_func`.
|
|
75
78
|
- Renamed `cmd2/command_definition.py` to `cmd2/command_set.py`.
|
|
76
79
|
- Removed `Cmd.doc_header` and the `with_default_category` decorator. Help categorization is now
|
|
77
80
|
driven by the `DEFAULT_CATEGORY` class variable (see **Simplified command categorization** in
|
|
@@ -81,9 +84,8 @@ prompt is displayed.
|
|
|
81
84
|
- `cmd2` no longer sets a default title for a subparsers group. If you desire a title, you will
|
|
82
85
|
need to pass one in like this `parser.add_subparsers(title="subcommands")`. This is standard
|
|
83
86
|
`argparse` behavior.
|
|
84
|
-
-
|
|
85
|
-
|
|
86
|
-
- `TextGroup` now implements `HelpFormatterRenderable`.
|
|
87
|
+
- `TextGroup` now implements `HelpFormatterRenderable` (see Enhancements section below for more
|
|
88
|
+
details).
|
|
87
89
|
- Removed `formatter_creator` parameter from `TextGroup.__init__()`.
|
|
88
90
|
- Removed `Cmd2ArgumentParser.create_text_group()` method.
|
|
89
91
|
- `argparse` and `Rich` integration refactoring:
|
|
@@ -95,9 +97,9 @@ prompt is displayed.
|
|
|
95
97
|
- `RawDescriptionCmd2HelpFormatter`
|
|
96
98
|
- `RawTextCmd2HelpFormatter`
|
|
97
99
|
- `TextGroup`
|
|
98
|
-
- Replaced the global `APP_THEME` constant in `rich_utils.py` with `get_theme()
|
|
99
|
-
`
|
|
100
|
-
theme.
|
|
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.
|
|
101
103
|
- Renamed `Cmd._command_parsers` to `Cmd.command_parsers`.
|
|
102
104
|
- Removed `RichPrintKwargs` `TypedDict` in favor of using `Mapping[str, Any]`, allowing for
|
|
103
105
|
greater flexibility in passing keyword arguments to `console.print()` calls.
|
|
@@ -109,6 +111,10 @@ prompt is displayed.
|
|
|
109
111
|
treated as command output and sent to `self.stdout`, allowing them to be captured.
|
|
110
112
|
- Verbose help table descriptions are no longer generated from help function output. The system
|
|
111
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()`.
|
|
112
118
|
- Enhancements
|
|
113
119
|
- New `cmd2.Cmd` parameters
|
|
114
120
|
- **auto_suggest**: (boolean) if `True`, provide fish shell style auto-suggestions. These
|
|
@@ -145,11 +151,38 @@ prompt is displayed.
|
|
|
145
151
|
full type hints and IDE autocompletion for `self._cmd` without needing to override and cast
|
|
146
152
|
the property.
|
|
147
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`.
|
|
148
156
|
- The `print()` function available in a `pyscript` writes to `self.stdout` and respects the
|
|
149
157
|
`allow_style` setting. It also supports printing `Rich` objects.
|
|
150
158
|
- Added `Cmd2ArgumentParser.output_to()` context manager to temporarily set the output stream
|
|
151
159
|
during `argparse` operations. This is helpful for directing output for functions like
|
|
152
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
|
|
153
186
|
|
|
154
187
|
## 3.5.1 (April 24, 2026)
|
|
155
188
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cmd2
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.0rc2
|
|
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,15 +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.
|
|
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
24
|
Requires-Dist: prompt-toolkit>=3.0.52
|
|
27
25
|
Requires-Dist: pyperclip>=1.8.2
|
|
28
26
|
Requires-Dist: rich>=15.0.0
|
|
29
27
|
Requires-Dist: rich-argparse>=1.7.2
|
|
30
|
-
Requires-Dist: typing-extensions; python_version == "3.10"
|
|
31
28
|
Dynamic: license-file
|
|
32
29
|
|
|
33
30
|
<h1 align="center">cmd2 : immersive interactive command line applications</h1>
|
|
@@ -57,10 +54,11 @@ applications. It provides a simple API which is an extension of Python's built-i
|
|
|
57
54
|
of cmd to make your life easier and eliminates much of the boilerplate code which would be necessary
|
|
58
55
|
when using cmd.
|
|
59
56
|
|
|
60
|
-
> :warning:
|
|
61
|
-
> incompatibilities from version `2.x`. Please see the
|
|
62
|
-
> [
|
|
63
|
-
>
|
|
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 version `2.x`. 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`**
|
|
64
62
|
|
|
65
63
|
## The developers toolbox
|
|
66
64
|
|
|
@@ -118,7 +116,7 @@ On all operating systems, the latest stable version of `cmd2` can be installed u
|
|
|
118
116
|
pip install -U cmd2
|
|
119
117
|
```
|
|
120
118
|
|
|
121
|
-
cmd2 works with Python 3.
|
|
119
|
+
cmd2 works with Python 3.11+ on Windows, macOS, and Linux. It is pure Python code with few 3rd-party
|
|
122
120
|
dependencies. It works with both conventional CPython and free-threaded variants.
|
|
123
121
|
|
|
124
122
|
For information on other installation options, see
|
|
@@ -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:
|
|
29
|
-
> incompatibilities from version `2.x`. Please see the
|
|
30
|
-
> [
|
|
31
|
-
>
|
|
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 version `2.x`. 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
|
|
|
@@ -86,7 +87,7 @@ On all operating systems, the latest stable version of `cmd2` can be installed u
|
|
|
86
87
|
pip install -U cmd2
|
|
87
88
|
```
|
|
88
89
|
|
|
89
|
-
cmd2 works with Python 3.
|
|
90
|
+
cmd2 works with Python 3.11+ on Windows, macOS, and Linux. It is pure Python code with few 3rd-party
|
|
90
91
|
dependencies. It works with both conventional CPython and free-threaded variants.
|
|
91
92
|
|
|
92
93
|
For information on other installation options, see
|
|
@@ -11,11 +11,13 @@ from . import (
|
|
|
11
11
|
rich_utils,
|
|
12
12
|
string_utils,
|
|
13
13
|
)
|
|
14
|
-
from .
|
|
14
|
+
from .annotated import with_annotated
|
|
15
|
+
from .argparse_completer import set_default_argparse_completer
|
|
15
16
|
from .argparse_utils import (
|
|
16
17
|
Cmd2ArgumentParser,
|
|
18
|
+
SubcommandRecord,
|
|
17
19
|
register_argparse_argument_parameter,
|
|
18
|
-
|
|
20
|
+
set_default_argument_parser,
|
|
19
21
|
)
|
|
20
22
|
from .cmd2 import Cmd
|
|
21
23
|
from .colors import Color
|
|
@@ -51,11 +53,14 @@ from .rich_utils import (
|
|
|
51
53
|
RawDescriptionCmd2HelpFormatter,
|
|
52
54
|
RawTextCmd2HelpFormatter,
|
|
53
55
|
TextGroup,
|
|
54
|
-
get_theme,
|
|
55
|
-
set_theme,
|
|
56
56
|
)
|
|
57
57
|
from .string_utils import stylize
|
|
58
58
|
from .styles import Cmd2Style
|
|
59
|
+
from .theme import (
|
|
60
|
+
get_theme,
|
|
61
|
+
reset_theme,
|
|
62
|
+
update_theme,
|
|
63
|
+
)
|
|
59
64
|
from .utils import (
|
|
60
65
|
CustomCompletionSettings,
|
|
61
66
|
Settable,
|
|
@@ -68,9 +73,10 @@ __all__: list[str] = [ # noqa: RUF022
|
|
|
68
73
|
"DEFAULT_SHORTCUTS",
|
|
69
74
|
# Argparse Exports
|
|
70
75
|
"Cmd2ArgumentParser",
|
|
76
|
+
"SubcommandRecord",
|
|
71
77
|
"register_argparse_argument_parameter",
|
|
72
|
-
"
|
|
73
|
-
"
|
|
78
|
+
"set_default_argparse_completer",
|
|
79
|
+
"set_default_argument_parser",
|
|
74
80
|
# Cmd2
|
|
75
81
|
"Cmd",
|
|
76
82
|
"CommandResult",
|
|
@@ -83,6 +89,7 @@ __all__: list[str] = [ # noqa: RUF022
|
|
|
83
89
|
"CompletionItem",
|
|
84
90
|
"Completions",
|
|
85
91
|
# Decorators
|
|
92
|
+
"with_annotated",
|
|
86
93
|
"with_argument_list",
|
|
87
94
|
"with_argparser",
|
|
88
95
|
"with_category",
|
|
@@ -100,16 +107,18 @@ __all__: list[str] = [ # noqa: RUF022
|
|
|
100
107
|
# Rich Utils
|
|
101
108
|
"ArgumentDefaultsCmd2HelpFormatter",
|
|
102
109
|
"Cmd2HelpFormatter",
|
|
103
|
-
"get_theme",
|
|
104
110
|
"MetavarTypeCmd2HelpFormatter",
|
|
105
111
|
"RawDescriptionCmd2HelpFormatter",
|
|
106
112
|
"RawTextCmd2HelpFormatter",
|
|
107
|
-
"set_theme",
|
|
108
113
|
"TextGroup",
|
|
109
114
|
# String Utils
|
|
110
115
|
"stylize",
|
|
111
|
-
# Styles
|
|
116
|
+
# Styles
|
|
112
117
|
"Cmd2Style",
|
|
118
|
+
# Theme
|
|
119
|
+
"get_theme",
|
|
120
|
+
"reset_theme",
|
|
121
|
+
"update_theme",
|
|
113
122
|
# Utilities
|
|
114
123
|
"categorize",
|
|
115
124
|
"CustomCompletionSettings",
|