cmd2 2.5.11__tar.gz → 2.6.1__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-2.5.11 → cmd2-2.6.1}/.pre-commit-config.yaml +6 -3
- {cmd2-2.5.11 → cmd2-2.6.1}/CHANGELOG.md +124 -51
- {cmd2-2.5.11 → cmd2-2.6.1}/Makefile +21 -4
- {cmd2-2.5.11 → cmd2-2.6.1}/PKG-INFO +34 -17
- {cmd2-2.5.11 → cmd2-2.6.1}/README.md +29 -13
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2/__init__.py +11 -22
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2/ansi.py +78 -91
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2/argparse_completer.py +109 -132
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2/argparse_custom.py +199 -217
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2/clipboard.py +2 -6
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2/cmd2.py +483 -551
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2/command_definition.py +34 -44
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2/constants.py +1 -3
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2/decorators.py +47 -58
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2/exceptions.py +23 -46
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2/history.py +29 -43
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2/parsing.py +59 -84
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2/plugin.py +6 -10
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2/py_bridge.py +20 -26
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2/rl_utils.py +45 -69
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2/table_creator.py +83 -106
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2/transcript.py +55 -59
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2/utils.py +173 -199
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2.egg-info/PKG-INFO +34 -17
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2.egg-info/SOURCES.txt +4 -0
- cmd2-2.6.1/codecov.yml +17 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/generating_output.md +11 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/history.md +4 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/settings.md +1 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/overview/installation.md +21 -9
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/README.md +2 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/alias_startup.py +3 -5
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/arg_decorators.py +8 -10
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/arg_print.py +15 -16
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/argparse_completion.py +10 -19
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/async_printing.py +21 -35
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/basic.py +6 -7
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/basic_completion.py +21 -27
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/cmd_as_argument.py +12 -15
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/colors.py +6 -8
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/custom_parser.py +5 -10
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/decorator_example.py +10 -14
- cmd2-2.6.1/examples/default_categories.py +76 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/dynamic_commands.py +4 -5
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/environment.py +5 -8
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/event_loops.py +1 -2
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/example.py +9 -11
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/exit_code.py +6 -10
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/first_app.py +13 -15
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/hello_cmd2.py +1 -4
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/help_categories.py +49 -52
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/hooks.py +6 -11
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/initialization.py +6 -7
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/migrating.py +10 -13
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/modular_commands/commandset_basic.py +21 -29
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/modular_commands/commandset_complex.py +13 -20
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/modular_commands/commandset_custominit.py +4 -7
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/modular_commands_basic.py +8 -13
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/modular_commands_dynamic.py +11 -15
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/modular_commands_main.py +8 -13
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/modular_subcommands.py +13 -16
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/override_parser.py +2 -7
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/paged_output.py +6 -10
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/persistent_history.py +1 -2
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/pirate.py +15 -16
- cmd2-2.6.1/examples/pretty_print.py +29 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/python_scripting.py +7 -8
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/read_input.py +13 -22
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/remove_builtin_commands.py +1 -2
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/remove_settable.py +2 -5
- cmd2-2.6.1/examples/scripts/arg_printer.py +7 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/scripts/conditional.py +9 -12
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/scripts/save_help_text.py +18 -30
- cmd2-2.6.1/examples/scripts/script.py +3 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/subcommands.py +14 -17
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/table_creation.py +24 -31
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/unicode_commands.py +4 -5
- cmd2-2.6.1/package.json +6 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/ext_test/build-pyenvs.sh +2 -2
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/ext_test/cmd2_ext_test/__init__.py +0 -2
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/ext_test/cmd2_ext_test/cmd2_ext_test.py +2 -4
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/ext_test/examples/example.py +1 -4
- {cmd2-2.5.11/plugins/template → cmd2-2.6.1/plugins/ext_test}/noxfile.py +1 -1
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/ext_test/setup.py +3 -11
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/ext_test/tasks.py +7 -12
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/ext_test/tests/test_ext_test.py +0 -3
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/tasks.py +21 -33
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/template/README.md +3 -1
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/template/build-pyenvs.sh +2 -2
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/template/cmd2_myplugin/__init__.py +1 -3
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/template/cmd2_myplugin/myplugin.py +12 -16
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/template/examples/example.py +3 -6
- {cmd2-2.5.11/plugins/ext_test → cmd2-2.6.1/plugins/template}/noxfile.py +2 -2
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/template/setup.py +4 -7
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/template/tasks.py +37 -41
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/template/tests/test_myplugin.py +5 -9
- cmd2-2.6.1/pyproject.toml +326 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tasks.py +57 -60
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/conftest.py +17 -26
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/pyscript/echo.py +0 -1
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/pyscript/environment.py +3 -4
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/pyscript/help.py +0 -1
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/pyscript/py_locals.py +0 -1
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/pyscript/pyscript_dir.py +0 -1
- cmd2-2.6.1/tests/pyscript/raises_exception.py +3 -0
- cmd2-2.6.1/tests/pyscript/recursive.py +8 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/pyscript/self_in_py.py +0 -1
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/pyscript/stdout_capture.py +0 -1
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/pyscript/stop.py +0 -1
- cmd2-2.6.1/tests/script.py +3 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/test_ansi.py +36 -37
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/test_argparse.py +80 -89
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/test_argparse_completer.py +128 -148
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/test_argparse_custom.py +46 -50
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/test_cmd2.py +380 -387
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/test_completion.py +289 -266
- cmd2-2.6.1/tests/test_future_annotations.py +22 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/test_history.py +71 -75
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/test_parsing.py +102 -97
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/test_plugin.py +62 -76
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/test_run_pyscript.py +37 -41
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/test_table_creator.py +41 -61
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/test_transcript.py +26 -31
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/test_utils.py +145 -114
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/test_utils_defining_class.py +14 -17
- cmd2-2.6.1/tests_isolated/__init__.py +0 -0
- cmd2-2.6.1/tests_isolated/test_commandset/__init__.py +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests_isolated/test_commandset/conftest.py +20 -31
- {cmd2-2.5.11 → cmd2-2.6.1}/tests_isolated/test_commandset/test_argparse_subcommands.py +23 -28
- {cmd2-2.5.11 → cmd2-2.6.1}/tests_isolated/test_commandset/test_categories.py +21 -35
- {cmd2-2.5.11 → cmd2-2.6.1}/tests_isolated/test_commandset/test_commandset.py +134 -140
- cmd2-2.5.11/examples/default_categories.py +0 -89
- cmd2-2.5.11/examples/scripts/arg_printer.py +0 -8
- cmd2-2.5.11/examples/scripts/script.py +0 -7
- cmd2-2.5.11/pyproject.toml +0 -295
- cmd2-2.5.11/tests/__init__.py +0 -3
- cmd2-2.5.11/tests/pyscript/raises_exception.py +0 -7
- cmd2-2.5.11/tests/pyscript/recursive.py +0 -13
- cmd2-2.5.11/tests/script.py +0 -7
- cmd2-2.5.11/tests_isolated/test_commandset/__init__.py +0 -3
- {cmd2-2.5.11 → cmd2-2.6.1}/.prettierignore +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/.prettierrc +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/.readthedocs.yaml +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/LICENSE +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/MANIFEST.in +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/Pipfile +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2/py.typed +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2.egg-info/dependency_links.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2.egg-info/requires.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2.egg-info/top_level.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/cmd2.png +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/api/ansi.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/api/argparse_completer.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/api/argparse_custom.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/api/cmd.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/api/command_definition.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/api/constants.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/api/decorators.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/api/exceptions.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/api/history.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/api/index.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/api/parsing.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/api/plugin.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/api/py_bridge.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/api/table_creator.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/api/utils.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/doc_conventions.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/examples/alternate_event_loops.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/examples/examples.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/examples/first_app.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/examples/index.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/argument_processing.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/builtin_commands.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/clipboard.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/commands.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/completion.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/disable_commands.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/embedded_python_shells.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/help.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/hooks.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/index.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/initialization.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/misc.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/modular_commands.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/multiline_commands.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/os.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/packaging.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/plugins.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/prompt.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/redirection.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/scripting.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/shortcuts_aliases_macros.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/startup_commands.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/table_creation.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/features/transcripts.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/index.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/javascripts/readthedocs.js +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/migrating/incompatibilities.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/migrating/index.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/migrating/minimum.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/migrating/next_steps.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/migrating/why.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/overrides/main.html +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/overview/alternatives.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/overview/index.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/overview/integrating.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/overview/resources.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/plugins/external_test.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/plugins/index.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/requirements.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/stylesheets/readthedocs.css +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/docs/testing.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.cmd2rc +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/@plugins_snapshot.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/_ast.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/_ast.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/_codecs.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/_codecs.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/_collections_abc.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/_collections_abc.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/_typeshed/__init__.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/_typeshed/__init__.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/_typeshed/importlib.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/_typeshed/importlib.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/abc.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/abc.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/argparse.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/argparse.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/builtins.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/builtins.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/codecs.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/codecs.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/collections/__init__.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/collections/__init__.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/collections/abc.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/collections/abc.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/contextlib.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/contextlib.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/dataclasses.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/dataclasses.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/email/__init__.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/email/__init__.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/email/_policybase.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/email/_policybase.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/email/charset.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/email/charset.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/email/contentmanager.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/email/contentmanager.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/email/errors.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/email/errors.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/email/header.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/email/header.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/email/message.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/email/message.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/email/policy.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/email/policy.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/enum.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/enum.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/genericpath.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/genericpath.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/importlib/__init__.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/importlib/__init__.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/importlib/_abc.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/importlib/_abc.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/importlib/abc.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/importlib/abc.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/importlib/machinery.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/importlib/machinery.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/importlib/metadata/__init__.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/importlib/metadata/__init__.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/importlib/metadata/_meta.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/importlib/metadata/_meta.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/importlib/readers.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/importlib/readers.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/importlib/resources/__init__.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/importlib/resources/__init__.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/importlib/resources/abc.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/importlib/resources/abc.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/io.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/io.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/os/__init__.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/os/__init__.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/os/path.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/os/path.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/pathlib.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/pathlib.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/posixpath.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/posixpath.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/re.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/re.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/resource.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/resource.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/sre_compile.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/sre_compile.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/sre_constants.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/sre_constants.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/sre_parse.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/sre_parse.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/subprocess.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/subprocess.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/sys/__init__.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/sys/__init__.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/sys/_monitoring.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/sys/_monitoring.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/types.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/types.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/typing.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/typing.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/typing_extensions.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/typing_extensions.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/zipfile/__init__.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/zipfile/__init__.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/zipfile/_path.data.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/3.12/zipfile/_path.meta.json +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/.mypy_cache/CACHEDIR.TAG +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/cmd2_history.dat +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/modular_commands/__init__.py +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/scripts/nested.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/scripts/quit.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/scripts/script.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/tmux_launch.sh +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/tmux_split.sh +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/transcripts/exampleSession.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/transcripts/pirate.transcript +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/transcripts/quit.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/examples/transcripts/transcript_regex.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/mkdocs.yml +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/README.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/ext_test/CHANGELOG.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/ext_test/README.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/ext_test/cmd2_ext_test/py.typed +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/ext_test/cmd2_ext_test/pylintrc +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/ext_test/pyproject.toml +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/ext_test/tests/__init__.py +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/ext_test/tests/pylintrc +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/template/CHANGELOG.md +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/template/LICENSE +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/template/cmd2_myplugin/pylintrc +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/template/tests/__init__.py +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/plugins/template/tests/pylintrc +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/readme_files/shout_out.csv +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/readme_files/shoutout.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/setup.cfg +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/.cmd2rc +0 -0
- {cmd2-2.5.11/tests_isolated → cmd2-2.6.1/tests}/__init__.py +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/relative_multiple.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/script.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/scripts/binary.bin +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/scripts/empty.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/scripts/help.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/scripts/nested.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/scripts/one_down.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/scripts/postcmds.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/scripts/precmds.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/scripts/utf8.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/transcripts/bol_eol.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/transcripts/characterclass.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/transcripts/dotstar.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/transcripts/extension_notation.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/transcripts/failure.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/transcripts/from_cmdloop.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/transcripts/multiline_no_regex.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/transcripts/multiline_regex.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/transcripts/no_output.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/transcripts/no_output_last.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/transcripts/regex_set.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/transcripts/singleslash.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/transcripts/slashes_escaped.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/transcripts/slashslash.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/transcripts/spaces.txt +0 -0
- {cmd2-2.5.11 → cmd2-2.6.1}/tests/transcripts/word_boundaries.txt +0 -0
@@ -4,19 +4,22 @@ repos:
|
|
4
4
|
hooks:
|
5
5
|
- id: check-case-conflict
|
6
6
|
- id: check-merge-conflict
|
7
|
+
- id: check-toml
|
7
8
|
- id: end-of-file-fixer
|
8
9
|
- id: trailing-whitespace
|
9
10
|
|
10
11
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
11
|
-
rev: "v0.
|
12
|
+
rev: "v0.11.10"
|
12
13
|
hooks:
|
13
14
|
- id: ruff-format
|
14
15
|
args: [--config=pyproject.toml]
|
16
|
+
- id: ruff-check
|
17
|
+
args: [--config=pyproject.toml, --fix, --exit-non-zero-on-fix]
|
15
18
|
|
16
19
|
- repo: https://github.com/pre-commit/mirrors-prettier
|
17
20
|
rev: "v3.1.0"
|
18
21
|
hooks:
|
19
22
|
- id: prettier
|
20
23
|
additional_dependencies:
|
21
|
-
- prettier@3.
|
22
|
-
- prettier-plugin-toml@2.0.
|
24
|
+
- prettier@3.5.3
|
25
|
+
- prettier-plugin-toml@2.0.5
|
@@ -1,3 +1,17 @@
|
|
1
|
+
## 2.6.1 (June 8, 2025)
|
2
|
+
|
3
|
+
- Bug Fixes
|
4
|
+
- Fixed bug that prevented `cmd2` from working with `from __future__ import annotations`
|
5
|
+
|
6
|
+
## 2.6.0 (May 31, 2025)
|
7
|
+
|
8
|
+
- Breaking Change
|
9
|
+
- `cmd2` 2.6 supports Python 3.9+ (removed support for Python 3.8)
|
10
|
+
- Enhancements
|
11
|
+
- Added support for Python 3.14
|
12
|
+
- Added new `Cmd.ppretty()` method for pretty printing arbitrary Python data structures
|
13
|
+
- Clarified help text for `-t`/`--transcript` argument to the `history` command
|
14
|
+
|
1
15
|
## 2.5.11 (January 25, 2025)
|
2
16
|
|
3
17
|
- Bug Fixes
|
@@ -67,7 +81,8 @@
|
|
67
81
|
- Multiline commands are no longer fragmented in up-arrow history.
|
68
82
|
- Fixed bug where `async_alert()` overwrites readline's incremental and non-incremental search prompts.
|
69
83
|
- This fix introduces behavior where an updated prompt won't display after an aborted search
|
70
|
-
until a user presses Enter.
|
84
|
+
until a user presses Enter.
|
85
|
+
See [async_printing.py](https://github.com/python-cmd2/cmd2/blob/master/examples/async_printing.py)
|
71
86
|
example for how to handle this case using `Cmd.need_prompt_refresh()` and `Cmd.async_refresh_prompt()`.
|
72
87
|
- Enhancements
|
73
88
|
- Removed dependency on `attrs` and replaced with [dataclasses](https://docs.python.org/3/library/dataclasses.html)
|
@@ -263,7 +278,8 @@
|
|
263
278
|
and just opens an interactive Python shell.
|
264
279
|
- Changed default behavior of `runcmds_plus_hooks()` to not stop when Ctrl-C is pressed and instead
|
265
280
|
run the next command in its list.
|
266
|
-
- Removed `cmd2.Cmd.quit_on_sigint` flag, which when `True`, quit the application when Ctrl-C was pressed at the
|
281
|
+
- Removed `cmd2.Cmd.quit_on_sigint` flag, which when `True`, quit the application when Ctrl-C was pressed at the
|
282
|
+
prompt.
|
267
283
|
- The history bug fix resulted in structure changes to the classes in `cmd2.history`. Therefore, persistent history
|
268
284
|
files created with versions older than 2.0.0 are not compatible.
|
269
285
|
- Enhancements
|
@@ -496,7 +512,8 @@
|
|
496
512
|
- Enhancements
|
497
513
|
- The documentation at [cmd2.rftd.io](https://cmd2.readthedocs.io) received a major overhaul
|
498
514
|
- Other
|
499
|
-
- Moved [categorize](https://cmd2.readthedocs.io/en/latest/api/utils.html#miscellaneous) utility function from
|
515
|
+
- Moved [categorize](https://cmd2.readthedocs.io/en/latest/api/utils.html#miscellaneous) utility function from \*
|
516
|
+
\*decorators** module to **utils\*\* module
|
500
517
|
- Notes
|
501
518
|
- Now that the 1.0 release is out, `cmd2` intends to follow [Semantic Versioning](https://semver.org)
|
502
519
|
|
@@ -640,7 +657,8 @@
|
|
640
657
|
## 0.9.19 (October 14, 2019)
|
641
658
|
|
642
659
|
- Bug Fixes
|
643
|
-
- Fixed `ValueError` exception which could occur when an old format persistent history file is loaded with new
|
660
|
+
- Fixed `ValueError` exception which could occur when an old format persistent history file is loaded with new
|
661
|
+
`cmd2`
|
644
662
|
- Enhancements
|
645
663
|
- Improved displaying multiline CompletionErrors by indenting all lines
|
646
664
|
|
@@ -650,7 +668,8 @@
|
|
650
668
|
- Fixed bug introduced in 0.9.17 where help functions for hidden and disabled commands were not being filtered
|
651
669
|
out as help topics
|
652
670
|
- Enhancements
|
653
|
-
- `AutoCompleter` now handles argparse's mutually exclusive groups. It will not tab complete flag names or
|
671
|
+
- `AutoCompleter` now handles argparse's mutually exclusive groups. It will not tab complete flag names or
|
672
|
+
positionals
|
654
673
|
for already completed groups. It also will print an error if you try tab completing a flag's value if the flag
|
655
674
|
belongs to a completed group.
|
656
675
|
- `AutoCompleter` now uses the passed-in parser's help formatter to generate hint text. This gives help and
|
@@ -699,7 +718,8 @@
|
|
699
718
|
- Fixed issue where completer function of disabled command would still run
|
700
719
|
- Enhancements
|
701
720
|
- Greatly simplified using argparse-based tab completion. The new interface is a complete overhaul that breaks
|
702
|
-
the previous way of specifying completion and choices functions. See header
|
721
|
+
the previous way of specifying completion and choices functions. See header
|
722
|
+
of [argparse_custom.py](https://github.com/python-cmd2/cmd2/blob/master/cmd2/argparse_custom.py)
|
703
723
|
for more information.
|
704
724
|
- Enabled tab completion on multiline commands
|
705
725
|
- **Renamed Commands Notice**
|
@@ -711,8 +731,10 @@
|
|
711
731
|
- Lots of end users were confused particularly about what exactly `load` should be loading
|
712
732
|
- Breaking Changes
|
713
733
|
- Restored `cmd2.Cmd.statement_parser` to be a public attribute (no underscore)
|
714
|
-
- Since it can be useful for
|
715
|
-
|
734
|
+
- Since it can be useful for
|
735
|
+
creating [post-parsing hooks](https://cmd2.readthedocs.io/en/latest/features/hooks.html#postparsing-hooks)
|
736
|
+
- Completely overhauled the interface for adding tab completion to argparse arguments. See enhancements for more
|
737
|
+
details.
|
716
738
|
- `ACArgumentParser` is now called `Cmd2ArgumentParser`
|
717
739
|
- Moved `basic_complete` to utils.py
|
718
740
|
- Made optional arguments on the following completer methods keyword-only:
|
@@ -742,7 +764,8 @@
|
|
742
764
|
to determine if ANSI escape sequences should be stripped when not writing to a tty. See documentation for more
|
743
765
|
information on the `allow_ansi` setting.
|
744
766
|
- Breaking Changes
|
745
|
-
- Python 3.4 reached its [end of life](https://www.python.org/dev/peps/pep-0429/) on March 18, 2019 and is no longer
|
767
|
+
- Python 3.4 reached its [end of life](https://www.python.org/dev/peps/pep-0429/) on March 18, 2019 and is no longer
|
768
|
+
supported by `cmd2`
|
746
769
|
- If you need to use Python 3.4, you should pin your requirements to use `cmd2` 0.9.13
|
747
770
|
- Made lots of changes to minimize the public API of the `cmd2.Cmd` class
|
748
771
|
- Attributes and methods we do not intend to be public now all begin with an underscore
|
@@ -752,7 +775,9 @@
|
|
752
775
|
- `pexcept` - print Exception message to sys.stderr. If debug is true, print exception traceback if one exists
|
753
776
|
- Signature of `poutput` and `perror` significantly changed
|
754
777
|
- Removed color parameters `color`, `err_color`, and `war_color` from `poutput` and `perror`
|
755
|
-
- See the docstrings of these methods or
|
778
|
+
- See the docstrings of these methods or
|
779
|
+
the [cmd2 docs](https://cmd2.readthedocs.io/en/latest/features/generating_output.html) for more info on
|
780
|
+
applying styles to output messages
|
756
781
|
- `end` argument is now keyword-only and cannot be specified positionally
|
757
782
|
- `traceback_war` no longer exists as an argument since it isn't needed now that `perror` and `pexcept` exist
|
758
783
|
- Moved `cmd2.Cmd.colors` to ansi.py and renamed it to `allow_ansi`. This is now an application-wide setting.
|
@@ -832,7 +857,8 @@
|
|
832
857
|
- Bug Fixes
|
833
858
|
- Fixed a bug in how redirection and piping worked inside `py` or `pyscript` commands
|
834
859
|
- Fixed bug in `async_alert` where it didn't account for prompts that contained newline characters
|
835
|
-
- Fixed path completion case when CWD is just a slash. Relative path matches were incorrectly prepended with a
|
860
|
+
- Fixed path completion case when CWD is just a slash. Relative path matches were incorrectly prepended with a
|
861
|
+
slash.
|
836
862
|
- Enhancements
|
837
863
|
- Added ability to include command name placeholders in the message printed when trying to run a disabled command.
|
838
864
|
- See docstring for `disable_command()` or `disable_category()` for more details.
|
@@ -850,7 +876,8 @@
|
|
850
876
|
- The following commands now write to stderr instead of stdout when printing an error. This will make catching
|
851
877
|
errors easier in pyscript.
|
852
878
|
_ `do_help()` - when no help information can be found
|
853
|
-
_ `default()` - in all cases since this is called when an invalid command name is run \*
|
879
|
+
_ `default()` - in all cases since this is called when an invalid command name is run \*
|
880
|
+
`_report_disabled_command_usage()` - in all cases since this is called when a disabled command is run
|
854
881
|
- Removed \*\*\* from beginning of error messages printed by `do_help()` and `default()`
|
855
882
|
- Significantly refactored `cmd.Cmd` class so that all class attributes got converted to instance attributes, also:
|
856
883
|
- Added `allow_redirection`, `terminators`, `multiline_commands`, and `shortcuts` as optional arguments
|
@@ -980,7 +1007,8 @@
|
|
980
1007
|
- The **set** command now tab completes settable parameter names
|
981
1008
|
- Added `async_alert`, `async_update_prompt`, and `set_window_title` functions
|
982
1009
|
- These allow you to provide feedback to the user in an asynchronous fashion, meaning alerts can
|
983
|
-
display when the user is still entering text at the prompt.
|
1010
|
+
display when the user is still entering text at the prompt.
|
1011
|
+
See [async_printing.py](https://github.com/python-cmd2/cmd2/blob/master/examples/async_printing.py)
|
984
1012
|
for an example.
|
985
1013
|
- Cross-platform colored output support
|
986
1014
|
- `colorama` gets initialized properly in `Cmd.__init()`
|
@@ -996,7 +1024,8 @@
|
|
996
1024
|
- Deprecated the built-in `cmd2` support for colors including `Cmd.colorize()` and `Cmd._colorcodes`
|
997
1025
|
- Deletions (potentially breaking changes)
|
998
1026
|
- The `preparse`, `postparsing_precmd`, and `postparsing_postcmd` methods _deprecated_ in the previous release
|
999
|
-
have been deleted \* The new application lifecycle hook system allows for registration of callbacks to be called
|
1027
|
+
have been deleted \* The new application lifecycle hook system allows for registration of callbacks to be called
|
1028
|
+
at various points
|
1000
1029
|
in the lifecycle and is more powerful and flexible than the previous system
|
1001
1030
|
- `alias` is now a command with subcommands to create, list, and delete aliases. Therefore its syntax
|
1002
1031
|
has changed. All current alias commands in startup scripts or transcripts will break with this release.
|
@@ -1012,7 +1041,8 @@
|
|
1012
1041
|
framework, see `docs/hooks.rst` for details.
|
1013
1042
|
- New dependency on `attrs` third party module
|
1014
1043
|
- Added `matches_sorted` member to support custom sorting of tab completion matches
|
1015
|
-
- Added [tab_autocomp_dynamic.py](https://github.com/python-cmd2/cmd2/blob/master/examples/tab_autocomp_dynamic.py)
|
1044
|
+
- Added [tab_autocomp_dynamic.py](https://github.com/python-cmd2/cmd2/blob/master/examples/tab_autocomp_dynamic.py)
|
1045
|
+
example
|
1016
1046
|
- Demonstrates updating the argparse object during init instead of during class construction
|
1017
1047
|
- Deprecations
|
1018
1048
|
- Deprecated the following hook methods, see `hooks.rst` for full details:
|
@@ -1051,8 +1081,10 @@
|
|
1051
1081
|
- Added `chop` argument to `cmd2.Cmd.ppaged()` method for displaying output using a pager
|
1052
1082
|
- If `chop` is `False`, then `self.pager` is used as the pager
|
1053
1083
|
- Otherwise `self.pager_chop` is used as the pager
|
1054
|
-
- Greatly improved the [table_display.py](https://github.com/python-cmd2/cmd2/blob/master/examples/table_display.py)
|
1055
|
-
|
1084
|
+
- Greatly improved the [table_display.py](https://github.com/python-cmd2/cmd2/blob/master/examples/table_display.py)
|
1085
|
+
example
|
1086
|
+
- Now uses the new [tableformatter](https://github.com/python-tableformatter/tableformatter) module which looks
|
1087
|
+
better than `tabulate`
|
1056
1088
|
- Deprecations
|
1057
1089
|
- The `CmdResult` helper class is _deprecated_ and replaced by the improved `CommandResult` class
|
1058
1090
|
- `CommandResult` has the following attributes: **stdout**, **stderr**, and **data**
|
@@ -1075,32 +1107,46 @@
|
|
1075
1107
|
## 0.9.0 (May 28, 2018)
|
1076
1108
|
|
1077
1109
|
- Bug Fixes
|
1078
|
-
- If self.default_to_shell is true, then redirection and piping are now properly passed to the shell. Previously it
|
1110
|
+
- If self.default_to_shell is true, then redirection and piping are now properly passed to the shell. Previously it
|
1111
|
+
was truncated.
|
1079
1112
|
- Submenus now call all hooks, it used to just call precmd and postcmd.
|
1080
1113
|
- Enhancements
|
1081
1114
|
- Automatic completion of `argparse` arguments via `cmd2.argparse_completer.AutoCompleter`
|
1082
|
-
- See
|
1115
|
+
- See
|
1116
|
+
the [tab_autocompletion.py](https://github.com/python-cmd2/cmd2/blob/master/examples/tab_autocompletion.py)
|
1117
|
+
example for a demonstration of how to use this feature
|
1083
1118
|
- `cmd2` no longer depends on the `six` module
|
1084
1119
|
- `cmd2` is now a multi-file Python package instead of a single-file module
|
1085
1120
|
- New pyscript approach that provides a pythonic interface to commands in the cmd2 application.
|
1086
1121
|
- Switch command parsing from pyparsing to custom code which utilizes shlex.
|
1087
|
-
- The object passed to do*\* methods has changed. It no longer is the pyparsing object, it's a new Statement
|
1122
|
+
- The object passed to do*\* methods has changed. It no longer is the pyparsing object, it's a new Statement
|
1123
|
+
object, which is a subclass of `str`. The statement object has many attributes which give you access to
|
1124
|
+
various components of the parsed input. If you were using anything but the string in your do*\* methods, this
|
1125
|
+
change will require you to update your code.
|
1088
1126
|
- `commentGrammars` is no longer supported or available. Comments are C-style or python style.
|
1089
1127
|
- Input redirection no longer supported. Use the load command instead.
|
1090
1128
|
- `multilineCommand` attribute is `now multiline_command`
|
1091
|
-
- `identchars` is now ignored. The standardlibrary cmd uses those characters to split the first "word" of the
|
1092
|
-
|
1093
|
-
|
1129
|
+
- `identchars` is now ignored. The standardlibrary cmd uses those characters to split the first "word" of the
|
1130
|
+
input, but cmd2 hasn't used those for a while, and the new parsing logic parses on whitespace, which has the
|
1131
|
+
added benefit of full unicode support, unlike cmd or prior versions of cmd2.
|
1132
|
+
- `set_posix_shlex` function and `POSIX_SHLEX` variable have been removed. Parsing behavior is now always the
|
1133
|
+
more forgiving `posix=false`.
|
1134
|
+
- `set_strip_quotes` function and `STRIP_QUOTES_FOR_NON_POSIX` have been removed. Quotes are stripped from
|
1135
|
+
arguments when presented as a list (a la `sys.argv`), and present when arguments are presented as a string (
|
1136
|
+
like the string passed to do\_\*).
|
1094
1137
|
- Changes
|
1095
1138
|
- `strip_ansi()` and `strip_quotes()` functions have moved to new utils module
|
1096
1139
|
- Several constants moved to new constants module
|
1097
|
-
- Submenu support has been moved to a new [cmd2-submenu](https://github.com/python-cmd2/cmd2-submenu) plugin. If you
|
1140
|
+
- Submenu support has been moved to a new [cmd2-submenu](https://github.com/python-cmd2/cmd2-submenu) plugin. If you
|
1141
|
+
use submenus, you will need to update your dependencies and modify your imports.
|
1098
1142
|
- Deletions (potentially breaking changes)
|
1099
1143
|
- Deleted all `optparse` code which had previously been deprecated in release 0.8.0
|
1100
1144
|
- The `options` decorator no longer exists
|
1101
1145
|
- All `cmd2` code should be ported to use the new `argparse`-based decorators
|
1102
|
-
- See the [Argument Processing](http://cmd2.readthedocs.io/en/latest/argument_processing.html) section of the
|
1103
|
-
|
1146
|
+
- See the [Argument Processing](http://cmd2.readthedocs.io/en/latest/argument_processing.html) section of the
|
1147
|
+
documentation for more information on these decorators
|
1148
|
+
- Alternatively, see
|
1149
|
+
the [argparse_example.py](https://github.com/python-cmd2/cmd2/blob/master/examples/argparse_example.py)
|
1104
1150
|
- Deleted `cmd_with_subs_completer`, `get_subcommands`, and `get_subcommand_completer`
|
1105
1151
|
- Replaced by default AutoCompleter implementation for all commands using argparse
|
1106
1152
|
- Deleted support for old method of calling application commands with `cmd()` and `self`
|
@@ -1117,7 +1163,8 @@
|
|
1117
1163
|
- Bug Fixes
|
1118
1164
|
- Commands using the @with_argparser_and_unknown_args were not correctly recognized when tab completing
|
1119
1165
|
- Fixed issue where completion display function was overwritten when a submenu quits
|
1120
|
-
- Fixed `AttributeError` on Windows when running a `select` command cause by **pyreadline** not implementing
|
1166
|
+
- Fixed `AttributeError` on Windows when running a `select` command cause by **pyreadline** not implementing
|
1167
|
+
`remove_history_item`
|
1121
1168
|
- Enhancements
|
1122
1169
|
- Added warning about **libedit** variant of **readline** not being supported on macOS
|
1123
1170
|
- Added tab completion of alias names in value field of **alias** command
|
@@ -1129,14 +1176,18 @@
|
|
1129
1176
|
|
1130
1177
|
- Bug Fixes
|
1131
1178
|
|
1132
|
-
- Fixed a bug with all argument decorators where the wrapped function wasn't returning a value and thus couldn't
|
1179
|
+
- Fixed a bug with all argument decorators where the wrapped function wasn't returning a value and thus couldn't
|
1180
|
+
cause the cmd2 app to quit
|
1133
1181
|
|
1134
1182
|
- Enhancements
|
1135
1183
|
|
1136
1184
|
- Added support for verbose help with -v where it lists a brief summary of what each command does
|
1137
1185
|
- Added support for categorizing commands into groups within the help menu
|
1138
|
-
- See
|
1139
|
-
|
1186
|
+
- See
|
1187
|
+
the [Grouping Commands](http://cmd2.readthedocs.io/en/latest/argument_processing.html?highlight=verbose#grouping-commands)
|
1188
|
+
section of the docs for more info
|
1189
|
+
- See [help_categories.py](https://github.com/python-cmd2/cmd2/blob/master/examples/help_categories.py) for an
|
1190
|
+
example
|
1140
1191
|
- Tab completion of paths now supports ~user user path expansion
|
1141
1192
|
- Simplified implementation of various tab completion functions so they no longer require `ctypes`
|
1142
1193
|
- Expanded documentation of `display_matches` list to clarify its purpose. See cmd2.py for this documentation.
|
@@ -1165,20 +1216,26 @@
|
|
1165
1216
|
- Tab completion has been overhauled and now supports completion of strings with quotes and spaces.
|
1166
1217
|
- Tab completion will automatically add an opening quote if a string with a space is completed.
|
1167
1218
|
- Added `delimiter_complete` function for tab completing delimited strings
|
1168
|
-
- Added more control over tab completion behavior including the following flags. The use of these flags is
|
1219
|
+
- Added more control over tab completion behavior including the following flags. The use of these flags is
|
1220
|
+
documented in cmd2.py
|
1169
1221
|
- `allow_appended_space`
|
1170
1222
|
- `allow_closing_quote`
|
1171
|
-
- Due to the tab completion changes, non-Windows platforms now depend
|
1223
|
+
- Due to the tab completion changes, non-Windows platforms now depend
|
1224
|
+
on [wcwidth](https://pypi.python.org/pypi/wcwidth).
|
1172
1225
|
- An alias name can now match a command name.
|
1173
1226
|
- An alias can now resolve to another alias.
|
1174
1227
|
|
1175
1228
|
- Attribute Changes (Breaks backward compatibility)
|
1176
|
-
- `exclude_from_help` is now called `hidden_commands` since these commands are hidden from things other than help,
|
1177
|
-
|
1229
|
+
- `exclude_from_help` is now called `hidden_commands` since these commands are hidden from things other than help,
|
1230
|
+
including tab completion
|
1231
|
+
- This list also no longer takes the function names of commands (`do_history`), but instead uses the command
|
1232
|
+
names themselves (`history`)
|
1178
1233
|
- `excludeFromHistory` is now called `exclude_from_history`
|
1179
|
-
- `cmd_with_subs_completer()` no longer takes an argument called `base`. Adding tab completion to subcommands has
|
1234
|
+
- `cmd_with_subs_completer()` no longer takes an argument called `base`. Adding tab completion to subcommands has
|
1235
|
+
been simplified to declaring it in the
|
1180
1236
|
subcommand parser's default settings. This easily allows arbitrary completers like path_complete to be used.
|
1181
|
-
See [subcommands.py](https://github.com/python-cmd2/cmd2/blob/master/examples/subcommands.py) for an example of
|
1237
|
+
See [subcommands.py](https://github.com/python-cmd2/cmd2/blob/master/examples/subcommands.py) for an example of
|
1238
|
+
how to use
|
1182
1239
|
tab completion in subcommands. In addition, the docstring for `cmd_with_subs_completer()` offers more details.
|
1183
1240
|
|
1184
1241
|
## 0.8.2 (March 21, 2018)
|
@@ -1189,12 +1246,15 @@
|
|
1189
1246
|
- Fixed a bug where the `AddSubmenu` decorator didn't work with a default value for `shared_attributes`
|
1190
1247
|
- Added a check to `ppaged()` to only use a pager when running in a real fully functional terminal
|
1191
1248
|
- Enhancements
|
1192
|
-
- Added [quit_on_sigint](http://cmd2.readthedocs.io/en/latest/settingchanges.html#quit-on-sigint) attribute to
|
1249
|
+
- Added [quit_on_sigint](http://cmd2.readthedocs.io/en/latest/settingchanges.html#quit-on-sigint) attribute to
|
1250
|
+
enable canceling current line instead of quitting when Ctrl+C is typed
|
1193
1251
|
- Added possibility of having readline history preservation in a SubMenu
|
1194
|
-
- Added [table_display.py](https://github.com/python-cmd2/cmd2/blob/master/examples/table_display.py) example to
|
1252
|
+
- Added [table_display.py](https://github.com/python-cmd2/cmd2/blob/master/examples/table_display.py) example to
|
1253
|
+
demonstrate how to display tabular data
|
1195
1254
|
- Added command aliasing with `alias` and `unalias` commands
|
1196
1255
|
- Added the ability to load an initialization script at startup
|
1197
|
-
- See [alias_startup.py](https://github.com/python-cmd2/cmd2/blob/master/examples/alias_startup.py) for an
|
1256
|
+
- See [alias_startup.py](https://github.com/python-cmd2/cmd2/blob/master/examples/alias_startup.py) for an
|
1257
|
+
example
|
1198
1258
|
- Added a default SIGINT handler which terminates any open pipe subprocesses and re-raises a KeyboardInterrupt
|
1199
1259
|
- For macOS, will load the `gnureadline` module if available and `readline` if not
|
1200
1260
|
|
@@ -1207,10 +1267,14 @@
|
|
1207
1267
|
- Fixed outdated [remove_unused.py](https://github.com/python-cmd2/cmd2/blob/master/examples/remove_unused.py)
|
1208
1268
|
- Enhancements
|
1209
1269
|
- Added support for sub-menus.
|
1210
|
-
- See [submenus.py](https://github.com/python-cmd2/cmd2/blob/master/examples/submenus.py) for an example of how
|
1270
|
+
- See [submenus.py](https://github.com/python-cmd2/cmd2/blob/master/examples/submenus.py) for an example of how
|
1271
|
+
to use it
|
1211
1272
|
- Added option for persistent readline history
|
1212
|
-
- See [persistent_history.py](https://github.com/python-cmd2/cmd2/blob/master/examples/persistent_history.py)
|
1213
|
-
|
1273
|
+
- See [persistent_history.py](https://github.com/python-cmd2/cmd2/blob/master/examples/persistent_history.py)
|
1274
|
+
for an example
|
1275
|
+
- See
|
1276
|
+
the [Searchable command history](http://cmd2.readthedocs.io/en/latest/freefeatures.html#searchable-command-history)
|
1277
|
+
section of the documentation for more info
|
1214
1278
|
- Improved PyPI packaging by including unit tests and examples in the tarball
|
1215
1279
|
- Improved documentation to make it more obvious that **poutput()** should be used instead of **print()**
|
1216
1280
|
- `exclude_from_help` and `excludeFromHistory` are now instance instead of class attributes
|
@@ -1237,11 +1301,15 @@
|
|
1237
1301
|
- **do\_\*** commands get a single argument which is the output of argparse.parse_args()
|
1238
1302
|
- **with_argparser_and_unknown_args** decorator for argparse-based argument parsing, but allows unknown args
|
1239
1303
|
- **do\_\*** commands get two arguments, the output of argparse.parse_known_args()
|
1240
|
-
- See the [Argument Processing](http://cmd2.readthedocs.io/en/latest/argument_processing.html) section of the
|
1241
|
-
|
1304
|
+
- See the [Argument Processing](http://cmd2.readthedocs.io/en/latest/argument_processing.html) section of the
|
1305
|
+
documentation for more information on these decorators
|
1306
|
+
- Alternatively, see
|
1307
|
+
the [argparse_example.py](https://github.com/python-cmd2/cmd2/blob/master/examples/argparse_example.py)
|
1242
1308
|
and [arg_print.py](https://github.com/python-cmd2/cmd2/blob/master/examples/arg_print.py) examples
|
1243
|
-
- Added support for Argparse subcommands when using the **with_argument_parser** or
|
1244
|
-
|
1309
|
+
- Added support for Argparse subcommands when using the **with_argument_parser** or \*
|
1310
|
+
\*with_argparser_and_unknown_args\*\* decorators
|
1311
|
+
- See [subcommands.py](https://github.com/python-cmd2/cmd2/blob/master/examples/subcommands.py) for an example
|
1312
|
+
of how to use subcommands
|
1245
1313
|
- Tab completion of subcommand names is automatically supported
|
1246
1314
|
- The **\_\_relative_load** command is now hidden from the help menu by default
|
1247
1315
|
- This command is not intended to be called from the command line, only from within scripts
|
@@ -1250,12 +1318,14 @@
|
|
1250
1318
|
- The **history** command can now automatically generate a transcript file for regression testing
|
1251
1319
|
- This makes creating regression tests for your `cmd2` application trivial
|
1252
1320
|
- Commands Removed
|
1253
|
-
- The **cmdenvironment** has been removed and its functionality incorporated into the **-a/--all** argument to **set
|
1321
|
+
- The **cmdenvironment** has been removed and its functionality incorporated into the **-a/--all** argument to **set
|
1322
|
+
**
|
1254
1323
|
- The **show** command has been removed. Its functionality has always existing within **set** and continues to do so
|
1255
1324
|
- The **save** command has been removed. The capability to save commands is now part of the **history** command.
|
1256
1325
|
- The **run** command has been removed. The capability to run prior commands is now part of the **history** command.
|
1257
1326
|
- Other changes
|
1258
|
-
- The **edit** command no longer allows you to edit prior commands. The capability to edit prior commands is now
|
1327
|
+
- The **edit** command no longer allows you to edit prior commands. The capability to edit prior commands is now
|
1328
|
+
part of the **history** command. The **edit** command still allows you to edit arbitrary files.
|
1259
1329
|
- the **autorun_on_edit** setting has been removed.
|
1260
1330
|
- For Python 3.4 and earlier, `cmd2` now has an additional dependency on the `contextlib2` module
|
1261
1331
|
- Deprecations
|
@@ -1362,7 +1432,8 @@
|
|
1362
1432
|
- Improved tab completion of file system paths, command names, and shell commands
|
1363
1433
|
- Thanks to Kevin Van Brunt for all of the help with debugging and testing this
|
1364
1434
|
- Changed default value of USE_ARG_LIST to True - this affects the beavhior of all **@options** commands
|
1365
|
-
- **WARNING**: This breaks backwards compatibility, to restore backwards compatibility, add this to the
|
1435
|
+
- **WARNING**: This breaks backwards compatibility, to restore backwards compatibility, add this to the \*\*
|
1436
|
+
\*\*init\*\*()\*\* method in your custom class derived from cmd2.Cmd:
|
1366
1437
|
- cmd2.set_use_arg_list(False)
|
1367
1438
|
- This change improves argument parsing for all new applications
|
1368
1439
|
- Refactored code to encapsulate most of the pyparsing logic into a ParserManager class
|
@@ -1412,11 +1483,13 @@
|
|
1412
1483
|
|
1413
1484
|
## 0.6.6.1 (August 14, 2013)
|
1414
1485
|
|
1415
|
-
- No changes to code trunk. Generated sdist from Python 2.7 to avoid 2to3 changes being applied to source. (
|
1486
|
+
- No changes to code trunk. Generated sdist from Python 2.7 to avoid 2to3 changes being applied to source. (
|
1487
|
+
Issue https://bitbucket.org/catherinedevlin/cmd2/issue/6/packaging-bug)
|
1416
1488
|
|
1417
1489
|
## 0.6.6 (August 6, 2013)
|
1418
1490
|
|
1419
|
-
- Added fix by bitbucket.org/desaintmartin to silence the editor check.
|
1491
|
+
- Added fix by bitbucket.org/desaintmartin to silence the editor check.
|
1492
|
+
bitbucket.org/catherinedevlin/cmd2/issue/1/silent-editor-check
|
1420
1493
|
|
1421
1494
|
## 0.6.5.1 (March 18, 2013)
|
1422
1495
|
|
@@ -1,18 +1,35 @@
|
|
1
1
|
# Simple Makefile for use with a uv-based development environment
|
2
2
|
.PHONY: install
|
3
|
-
install: ## Install the virtual environment
|
4
|
-
@echo "🚀 Creating virtual environment"
|
5
|
-
@uv
|
3
|
+
install: ## Install the virtual environment with dependencies
|
4
|
+
@echo "🚀 Creating uv Python virtual environment"
|
5
|
+
@uv python install 3.13
|
6
|
+
@uv sync --python=3.13
|
7
|
+
@echo "🚀 Installing Git pre-commit hooks locally"
|
8
|
+
@uv run pre-commit install
|
9
|
+
@echo "🚀 Installing Prettier using npm"
|
10
|
+
@npm install
|
6
11
|
|
7
12
|
.PHONY: check
|
8
13
|
check: ## Run code quality tools.
|
9
14
|
@echo "🚀 Checking lock file consistency with 'pyproject.toml'"
|
10
15
|
@uv lock --locked
|
11
|
-
@echo "🚀 Linting code: Running pre-commit"
|
16
|
+
@echo "🚀 Linting code and documentation: Running pre-commit"
|
12
17
|
@uv run pre-commit run -a
|
13
18
|
@echo "🚀 Static type checking: Running mypy"
|
14
19
|
@uv run mypy
|
15
20
|
|
21
|
+
.PHONY: format
|
22
|
+
format: ## Perform ruff formatting
|
23
|
+
@uv run ruff format
|
24
|
+
|
25
|
+
.PHONY: lint
|
26
|
+
lint: ## Perform ruff linting
|
27
|
+
@uv run ruff check --fix
|
28
|
+
|
29
|
+
.PHONY: typecheck
|
30
|
+
typecheck: ## Perform type checking
|
31
|
+
@uv run mypy
|
32
|
+
|
16
33
|
.PHONY: test
|
17
34
|
test: ## Test the code with pytest.
|
18
35
|
@echo "🚀 Testing code: Running pytest"
|
@@ -1,6 +1,6 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.4
|
2
2
|
Name: cmd2
|
3
|
-
Version: 2.
|
3
|
+
Version: 2.6.1
|
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: The MIT License (MIT)
|
@@ -33,20 +33,21 @@ Classifier: Intended Audience :: Developers
|
|
33
33
|
Classifier: Intended Audience :: System Administrators
|
34
34
|
Classifier: License :: OSI Approved :: MIT License
|
35
35
|
Classifier: Programming Language :: Python :: 3 :: Only
|
36
|
-
Classifier: Programming Language :: Python :: 3.8
|
37
36
|
Classifier: Programming Language :: Python :: 3.9
|
38
37
|
Classifier: Programming Language :: Python :: 3.10
|
39
38
|
Classifier: Programming Language :: Python :: 3.11
|
40
39
|
Classifier: Programming Language :: Python :: 3.12
|
41
40
|
Classifier: Programming Language :: Python :: 3.13
|
41
|
+
Classifier: Programming Language :: Python :: 3.14
|
42
42
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
43
|
-
Requires-Python: >=3.
|
43
|
+
Requires-Python: >=3.9
|
44
44
|
Description-Content-Type: text/markdown
|
45
45
|
License-File: LICENSE
|
46
46
|
Requires-Dist: gnureadline>=8; platform_system == "Darwin"
|
47
47
|
Requires-Dist: pyperclip>=1.8
|
48
48
|
Requires-Dist: pyreadline3>=3.4; platform_system == "Windows"
|
49
49
|
Requires-Dist: wcwidth>=0.2.10
|
50
|
+
Dynamic: license-file
|
50
51
|
|
51
52
|
<h1 align="center">cmd2 : immersive interactive command line applications</h1>
|
52
53
|
|
@@ -80,14 +81,21 @@ when using cmd.
|
|
80
81
|

|
81
82
|
|
82
83
|
When creating solutions developers have no shortage of tools to create rich and smart user interfaces.
|
83
|
-
System administrators have long been duct taping together brittle workflows based on a menagerie of simple command line
|
84
|
+
System administrators have long been duct taping together brittle workflows based on a menagerie of simple command line
|
85
|
+
tools created by strangers on github and the guy down the hall.
|
84
86
|
Unfortunately, when CLIs become significantly complex the ease of command discoverability tends to fade quickly.
|
85
|
-
On the other hand, Web and traditional desktop GUIs are first in class when it comes to easily discovering
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
87
|
+
On the other hand, Web and traditional desktop GUIs are first in class when it comes to easily discovering
|
88
|
+
functionality.
|
89
|
+
The price we pay for beautifully colored displays is complexity required to aggregate disperate applications into larger
|
90
|
+
systems.
|
91
|
+
`cmd2` fills the niche between high [ease of command discovery](https://clig.dev/#ease-of-discovery) applications and
|
92
|
+
smart workflow automation systems.
|
93
|
+
|
94
|
+
The `cmd2` framework provides a great mixture of both worlds. Application designers can easily create complex
|
95
|
+
applications and rely on the cmd2 library to offer effortless user facing help and extensive tab completion.
|
96
|
+
When users become comfortable with functionality, cmd2 turns into a feature rich library enabling a smooth transition to
|
97
|
+
full automation. If designed with enough forethought, a well implemented cmd2 application can serve as a boutique
|
98
|
+
workflow tool. `cmd2` pulls off this flexibility based on two pillars of philosophy:
|
91
99
|
|
92
100
|
- Tab Completion
|
93
101
|
- Automation Transition
|
@@ -96,7 +104,8 @@ When users become comfortable with functionality, cmd2 turns into a feature rich
|
|
96
104
|
|
97
105
|
<a href="https://imgflip.com/i/63h03x"><img src="https://i.imgflip.com/63h03x.jpg" title="made at imgflip.com" width="70%" height="%70"/></a>
|
98
106
|
|
99
|
-
Deep extensive tab completion and help text generation based on the argparse library create the first pillar of 'ease of
|
107
|
+
Deep extensive tab completion and help text generation based on the argparse library create the first pillar of 'ease of
|
108
|
+
command discovery'. The following is a list of features in this category.
|
100
109
|
|
101
110
|
- Great tab completion of commands, subcommands, file system paths, and shell commands.
|
102
111
|
- Custom tab completion for user designed commands via simple function overloading.
|
@@ -107,7 +116,8 @@ Deep extensive tab completion and help text generation based on the argparse lib
|
|
107
116
|
|
108
117
|
<a href="https://imgflip.com/i/66t0y0"><img src="https://i.imgflip.com/66t0y0.jpg" title="made at imgflip.com" width="70%" height="70%"/></a>
|
109
118
|
|
110
|
-
cmd2 creates the second pillar of 'ease of transition to automation' through alias/macro creation, command line argument
|
119
|
+
cmd2 creates the second pillar of 'ease of transition to automation' through alias/macro creation, command line argument
|
120
|
+
parsing and execution of cmd2 scripting.
|
111
121
|
|
112
122
|
- Flexible alias and macro creation for quick abstraction of commands.
|
113
123
|
- Text file scripting of your application with `run_script` (`@`) and `_relative_run_script` (`@@`)
|
@@ -122,7 +132,7 @@ On all operating systems, the latest stable version of `cmd2` can be installed u
|
|
122
132
|
pip install -U cmd2
|
123
133
|
```
|
124
134
|
|
125
|
-
cmd2 works with Python 3.
|
135
|
+
cmd2 works with Python 3.9+ on Windows, macOS, and Linux. It is pure Python code with few 3rd-party dependencies.
|
126
136
|
|
127
137
|
For information on other installation options, see
|
128
138
|
[Installation Instructions](https://cmd2.readthedocs.io/en/latest/overview/installation.html) in the cmd2
|
@@ -144,7 +154,8 @@ The best way to learn the cmd2 api is to delve into the example applications loc
|
|
144
154
|
- [example code](https://github.com/python-cmd2/talks/tree/master/PyOhio_2019/examples)
|
145
155
|
- [Cookiecutter](https://github.com/cookiecutter/cookiecutter) Templates from community
|
146
156
|
- Basic cookiecutter template for cmd2 application : https://github.com/jayrod/cookiecutter-python-cmd2
|
147
|
-
- Advanced cookiecutter template with external plugin
|
157
|
+
- Advanced cookiecutter template with external plugin
|
158
|
+
support : https://github.com/jayrod/cookiecutter-python-cmd2-ext-plug
|
148
159
|
- [cmd2 example applications](https://github.com/python-cmd2/cmd2/tree/master/examples)
|
149
160
|
- Basic cmd2 examples to demonstrate how to use various features
|
150
161
|
- [Advanced Examples](https://github.com/jayrod/cmd2-example-apps)
|
@@ -161,11 +172,14 @@ import cmd2
|
|
161
172
|
class FirstApp(cmd2.Cmd):
|
162
173
|
"""A simple cmd2 application."""
|
163
174
|
|
164
|
-
|
175
|
+
|
176
|
+
def do_hello_world(self, _: cmd2.Statement):
|
165
177
|
self.poutput('Hello World')
|
166
178
|
|
179
|
+
|
167
180
|
if __name__ == '__main__':
|
168
181
|
import sys
|
182
|
+
|
169
183
|
c = FirstApp()
|
170
184
|
sys.exit(c.cmdloop())
|
171
185
|
|
@@ -173,7 +187,10 @@ if __name__ == '__main__':
|
|
173
187
|
|
174
188
|
## Found a bug?
|
175
189
|
|
176
|
-
If you think you've found a bug, please first read through the
|
190
|
+
If you think you've found a bug, please first read through the
|
191
|
+
open [Issues](https://github.com/python-cmd2/cmd2/issues). If you're confident it's a new bug, go ahead and create a new
|
192
|
+
GitHub issue. Be sure to include as much information as possible so we can reproduce the bug. At a minimum, please state
|
193
|
+
the following:
|
177
194
|
|
178
195
|
- `cmd2` version
|
179
196
|
- Python version
|