cmd2 4.1.1__tar.gz → 4.1.2__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.1.1 → cmd2-4.1.2}/CHANGELOG.md +6 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/PKG-INFO +1 -1
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/cmd2.py +4 -13
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/utils.py +6 -3
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2.egg-info/PKG-INFO +1 -1
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2.egg-info/SOURCES.txt +0 -1
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2.egg-info/scm_file_list.json +185 -185
- cmd2-4.1.2/cmd2.egg-info/scm_version.json +8 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/default_categories.py +6 -7
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/getting_started.py +28 -25
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/hello_cmd2.py +2 -2
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_cmd2.py +26 -1
- cmd2-4.1.1/cmd2.egg-info/scm_version.json +0 -8
- cmd2-4.1.1/examples/cmd2_history.dat +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/.pre-commit-config.yaml +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/.prettierignore +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/.prettierrc +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/.typos.toml +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/GEMINI.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/LICENSE +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/MANIFEST.in +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/Makefile +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/README.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/__init__.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/annotated.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/argparse_completer.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/argparse_utils.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/clipboard.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/colors.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/command_set.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/completion.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/constants.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/decorators.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/exceptions.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/history.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/parsing.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/plugin.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/pt_utils.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/py.typed +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/py_bridge.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/rich_utils.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/string_utils.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/styles.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/theme.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2/types.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2.egg-info/dependency_links.txt +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2.egg-info/requires.txt +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2.egg-info/top_level.txt +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/cmd2.png +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/codecov.yml +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/annotated.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/argparse_completer.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/argparse_utils.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/clipboard.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/cmd.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/colors.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/command_set.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/completion.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/constants.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/decorators.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/exceptions.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/history.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/index.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/parsing.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/plugin.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/pt_utils.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/py_bridge.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/rich_utils.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/string_utils.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/styles.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/theme.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/api/utils.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/doc_conventions.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/examples/alternate_event_loops.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/examples/examples.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/examples/getting_started.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/examples/index.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/annotated.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/argument_processing.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/async_commands.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/builtin_commands.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/clipboard.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/commands.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/completion.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/disable_commands.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/embedded_python_shells.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/generating_output.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/help.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/history.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/hooks.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/index.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/initialization.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/misc.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/modular_commands.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/multiline_commands.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/os.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/packaging.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/plugins.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/prompt.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/redirection.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/scripting.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/settings.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/shortcuts_aliases_macros.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/startup_commands.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/table_creation.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/features/theme.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/index.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/javascripts/readthedocs.js +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/migrating/incompatibilities.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/migrating/index.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/migrating/minimum.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/migrating/next_steps.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/migrating/why.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/mixins/index.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/mixins/mixin_template.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/overrides/main.html +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/overview/alternatives.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/overview/index.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/overview/installation.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/overview/integrating.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/overview/resources.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/stylesheets/cmd2.css +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/testing.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/docs/upgrades.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/.cmd2rc +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/README.md +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/annotated_example.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/argparse_completion.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/argparse_example.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/async_call.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/async_commands.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/async_printing.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/basic_completion.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/cmd_as_argument.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/color.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/command_sets.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/completion_item_choices.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/custom_parser.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/custom_types.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/dynamic_commands.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/environment.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/event_loops.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/exit_code.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/help_categories.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/hooks.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/migrating.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/mixin.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/modular_commands/__init__.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/modular_commands/commandset_basic.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/modular_commands/commandset_complex.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/modular_commands/commandset_custominit.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/modular_commandsets.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/paged_output.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/persistent_history.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/pretty_print.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/python_scripting.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/read_input.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/remove_builtin_commands.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/remove_settable.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/rich_tables.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/rich_theme.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/scripts/arg_printer.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/scripts/conditional.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/scripts/nested.txt +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/scripts/quit.txt +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/scripts/save_help_text.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/scripts/script.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/scripts/script.txt +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/tmux_launch.sh +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/tmux_split.sh +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/examples/unicode_commands.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/mkdocs.yml +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/package.json +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/pyproject.toml +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/ruff.toml +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/scripts/validate_tag.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/setup.cfg +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/.cmd2rc +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/__init__.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/conftest.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/pyscript/echo.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/pyscript/environment.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/pyscript/help.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/pyscript/py_locals.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/pyscript/pyscript_dir.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/pyscript/raises_exception.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/pyscript/recursive.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/pyscript/self_in_py.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/pyscript/stop.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/pyscript/test_print.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/relative_multiple.txt +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/script.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/script.txt +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/scripts/binary.bin +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/scripts/empty.txt +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/scripts/help.txt +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/scripts/nested.txt +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/scripts/one_down.txt +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/scripts/postcmds.txt +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/scripts/precmds.txt +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/scripts/utf8.txt +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_annotated.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_argparse.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_argparse_completer.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_argparse_subcommands.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_argparse_utils.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_categories.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_commandset.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_completion.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_dynamic_complete_style.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_future_annotations.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_history.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_parsing.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_plugin.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_pt_utils.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_py_completion.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_rich_utils.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_run_pyscript.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_string_utils.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_theme.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_utils.py +0 -0
- {cmd2-4.1.1 → cmd2-4.1.2}/tests/test_utils_defining_class.py +0 -0
|
@@ -177,9 +177,6 @@ from .types import (
|
|
|
177
177
|
UnboundCompleter,
|
|
178
178
|
)
|
|
179
179
|
|
|
180
|
-
with contextlib.suppress(ImportError):
|
|
181
|
-
from IPython import start_ipython
|
|
182
|
-
|
|
183
180
|
try:
|
|
184
181
|
if sys.platform == "win32":
|
|
185
182
|
from prompt_toolkit.output.win32 import NoConsoleScreenBufferError # type: ignore[attr-defined]
|
|
@@ -1382,7 +1379,7 @@ class Cmd:
|
|
|
1382
1379
|
Settable(
|
|
1383
1380
|
"allow_style",
|
|
1384
1381
|
allow_style_type,
|
|
1385
|
-
|
|
1382
|
+
settable_description,
|
|
1386
1383
|
self,
|
|
1387
1384
|
choices_provider=get_allow_style_choices,
|
|
1388
1385
|
)
|
|
@@ -1399,7 +1396,7 @@ class Cmd:
|
|
|
1399
1396
|
Settable(
|
|
1400
1397
|
"editor",
|
|
1401
1398
|
str,
|
|
1402
|
-
|
|
1399
|
+
editor_description,
|
|
1403
1400
|
self,
|
|
1404
1401
|
)
|
|
1405
1402
|
)
|
|
@@ -1434,7 +1431,7 @@ class Cmd:
|
|
|
1434
1431
|
Settable(
|
|
1435
1432
|
"traceback_width",
|
|
1436
1433
|
utils.optional_int,
|
|
1437
|
-
|
|
1434
|
+
traceback_width_description,
|
|
1438
1435
|
self,
|
|
1439
1436
|
)
|
|
1440
1437
|
)
|
|
@@ -5151,13 +5148,7 @@ class Cmd:
|
|
|
5151
5148
|
# Detect whether IPython is installed
|
|
5152
5149
|
try:
|
|
5153
5150
|
import traitlets.config.loader as traitlets_loader
|
|
5154
|
-
|
|
5155
|
-
# Allow users to install ipython from a cmd2 prompt when needed and still have ipy command work
|
|
5156
|
-
try:
|
|
5157
|
-
_dummy = start_ipython # noqa: F823
|
|
5158
|
-
except NameError:
|
|
5159
|
-
from IPython import start_ipython
|
|
5160
|
-
|
|
5151
|
+
from IPython import start_ipython
|
|
5161
5152
|
from IPython.terminal.interactiveshell import TerminalInteractiveShell
|
|
5162
5153
|
from IPython.terminal.ipapp import TerminalIPythonApp
|
|
5163
5154
|
except ImportError:
|
|
@@ -25,7 +25,10 @@ from typing import (
|
|
|
25
25
|
cast,
|
|
26
26
|
)
|
|
27
27
|
|
|
28
|
+
from rich.text import Text
|
|
29
|
+
|
|
28
30
|
from . import constants
|
|
31
|
+
from . import rich_utils as ru
|
|
29
32
|
from . import string_utils as su
|
|
30
33
|
from .types import (
|
|
31
34
|
CmdOrSet,
|
|
@@ -88,7 +91,7 @@ class Settable:
|
|
|
88
91
|
self,
|
|
89
92
|
name: str,
|
|
90
93
|
val_type: type[Any] | Callable[[Any], Any],
|
|
91
|
-
description: str,
|
|
94
|
+
description: str | Text,
|
|
92
95
|
settable_object: object,
|
|
93
96
|
*,
|
|
94
97
|
settable_attrib_name: str | None = None,
|
|
@@ -108,7 +111,7 @@ class Settable:
|
|
|
108
111
|
input is a valid integer. Specifying bool automatically provides
|
|
109
112
|
completion for 'true' and 'false' and uses a built-in function
|
|
110
113
|
for conversion and validation.
|
|
111
|
-
:param description: A concise string that describes the purpose of this setting.
|
|
114
|
+
:param description: A concise string or rich Text object that describes the purpose of this setting.
|
|
112
115
|
:param settable_object: The object that owns the attribute being made settable (e.g. self).
|
|
113
116
|
:param settable_attrib_name: The name of the attribute on the settable_object that
|
|
114
117
|
will be modified. This defaults to the value of the name
|
|
@@ -142,7 +145,7 @@ class Settable:
|
|
|
142
145
|
|
|
143
146
|
self.name = name
|
|
144
147
|
self.val_type = val_type
|
|
145
|
-
self.description = description
|
|
148
|
+
self.description = ru.rich_text_to_string(description) if isinstance(description, Text) else description
|
|
146
149
|
self.settable_obj = settable_object
|
|
147
150
|
self.settable_attrib_name = settable_attrib_name if settable_attrib_name is not None else name
|
|
148
151
|
self.onchange_cb = onchange_cb
|
|
@@ -1,228 +1,228 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": [
|
|
3
|
+
".coveragerc",
|
|
4
|
+
".prettierignore",
|
|
5
|
+
".prettierrc",
|
|
6
|
+
".readthedocs.yaml",
|
|
7
|
+
"LICENSE",
|
|
8
|
+
"MANIFEST.in",
|
|
3
9
|
"cmd2.png",
|
|
4
10
|
"codecov.yml",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"CHANGELOG.md",
|
|
8
|
-
".pre-commit-config.yaml",
|
|
11
|
+
"package.json",
|
|
12
|
+
".typos.toml",
|
|
9
13
|
"Makefile",
|
|
14
|
+
"ruff.toml",
|
|
10
15
|
"pyproject.toml",
|
|
11
|
-
"
|
|
12
|
-
".coveragerc",
|
|
13
|
-
".prettierignore",
|
|
14
|
-
"README.md",
|
|
16
|
+
"mkdocs.yml",
|
|
15
17
|
".gitignore",
|
|
16
|
-
"package.json",
|
|
17
|
-
"ruff.toml",
|
|
18
|
-
".prettierrc",
|
|
19
18
|
"GEMINI.md",
|
|
20
|
-
".
|
|
21
|
-
".
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"tests
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"tests/scripts/binary.bin",
|
|
58
|
-
"tests/pyscript/pyscript_dir.py",
|
|
59
|
-
"tests/pyscript/test_print.py",
|
|
60
|
-
"tests/pyscript/recursive.py",
|
|
61
|
-
"tests/pyscript/stop.py",
|
|
62
|
-
"tests/pyscript/self_in_py.py",
|
|
63
|
-
"tests/pyscript/raises_exception.py",
|
|
64
|
-
"tests/pyscript/environment.py",
|
|
65
|
-
"tests/pyscript/py_locals.py",
|
|
66
|
-
"tests/pyscript/help.py",
|
|
67
|
-
"tests/pyscript/echo.py",
|
|
68
|
-
"docs/upgrades.md",
|
|
69
|
-
"docs/testing.md",
|
|
19
|
+
".pre-commit-config.yaml",
|
|
20
|
+
"README.md",
|
|
21
|
+
"CHANGELOG.md",
|
|
22
|
+
".github/CODE_OF_CONDUCT.md",
|
|
23
|
+
".github/dependabot.yml",
|
|
24
|
+
".github/CODEOWNERS",
|
|
25
|
+
".github/CONTRIBUTING.md",
|
|
26
|
+
".github/images/graph.drawio.png",
|
|
27
|
+
".github/workflows/codeql-analysis.yml",
|
|
28
|
+
".github/workflows/docs.yml",
|
|
29
|
+
".github/workflows/tests.yml",
|
|
30
|
+
".github/workflows/typecheck.yml",
|
|
31
|
+
".github/workflows/quality.yml",
|
|
32
|
+
"cmd2/clipboard.py",
|
|
33
|
+
"cmd2/py.typed",
|
|
34
|
+
"cmd2/command_set.py",
|
|
35
|
+
"cmd2/exceptions.py",
|
|
36
|
+
"cmd2/history.py",
|
|
37
|
+
"cmd2/plugin.py",
|
|
38
|
+
"cmd2/types.py",
|
|
39
|
+
"cmd2/string_utils.py",
|
|
40
|
+
"cmd2/colors.py",
|
|
41
|
+
"cmd2/completion.py",
|
|
42
|
+
"cmd2/py_bridge.py",
|
|
43
|
+
"cmd2/rich_utils.py",
|
|
44
|
+
"cmd2/parsing.py",
|
|
45
|
+
"cmd2/argparse_completer.py",
|
|
46
|
+
"cmd2/constants.py",
|
|
47
|
+
"cmd2/decorators.py",
|
|
48
|
+
"cmd2/__init__.py",
|
|
49
|
+
"cmd2/annotated.py",
|
|
50
|
+
"cmd2/argparse_utils.py",
|
|
51
|
+
"cmd2/pt_utils.py",
|
|
52
|
+
"cmd2/styles.py",
|
|
53
|
+
"cmd2/theme.py",
|
|
54
|
+
"cmd2/utils.py",
|
|
55
|
+
"cmd2/cmd2.py",
|
|
70
56
|
"docs/index.md",
|
|
57
|
+
"docs/testing.md",
|
|
71
58
|
"docs/doc_conventions.md",
|
|
72
|
-
"docs/
|
|
73
|
-
"docs/migrating/next_steps.md",
|
|
74
|
-
"docs/migrating/minimum.md",
|
|
75
|
-
"docs/migrating/incompatibilities.md",
|
|
76
|
-
"docs/migrating/index.md",
|
|
77
|
-
"docs/migrating/why.md",
|
|
78
|
-
"docs/mixins/mixin_template.md",
|
|
79
|
-
"docs/mixins/index.md",
|
|
80
|
-
"docs/features/generating_output.md",
|
|
81
|
-
"docs/features/async_commands.md",
|
|
82
|
-
"docs/features/settings.md",
|
|
83
|
-
"docs/features/multiline_commands.md",
|
|
84
|
-
"docs/features/embedded_python_shells.md",
|
|
85
|
-
"docs/features/initialization.md",
|
|
86
|
-
"docs/features/packaging.md",
|
|
87
|
-
"docs/features/commands.md",
|
|
88
|
-
"docs/features/annotated.md",
|
|
89
|
-
"docs/features/history.md",
|
|
90
|
-
"docs/features/prompt.md",
|
|
91
|
-
"docs/features/modular_commands.md",
|
|
92
|
-
"docs/features/help.md",
|
|
93
|
-
"docs/features/builtin_commands.md",
|
|
94
|
-
"docs/features/startup_commands.md",
|
|
95
|
-
"docs/features/clipboard.md",
|
|
96
|
-
"docs/features/argument_processing.md",
|
|
97
|
-
"docs/features/shortcuts_aliases_macros.md",
|
|
98
|
-
"docs/features/completion.md",
|
|
99
|
-
"docs/features/index.md",
|
|
100
|
-
"docs/features/theme.md",
|
|
101
|
-
"docs/features/disable_commands.md",
|
|
102
|
-
"docs/features/plugins.md",
|
|
103
|
-
"docs/features/hooks.md",
|
|
104
|
-
"docs/features/misc.md",
|
|
105
|
-
"docs/features/os.md",
|
|
106
|
-
"docs/features/table_creation.md",
|
|
107
|
-
"docs/features/scripting.md",
|
|
108
|
-
"docs/features/redirection.md",
|
|
109
|
-
"docs/examples/examples.md",
|
|
110
|
-
"docs/examples/getting_started.md",
|
|
111
|
-
"docs/examples/index.md",
|
|
112
|
-
"docs/examples/alternate_event_loops.md",
|
|
113
|
-
"docs/javascripts/readthedocs.js",
|
|
59
|
+
"docs/upgrades.md",
|
|
114
60
|
"docs/api/argparse_completer.md",
|
|
61
|
+
"docs/api/clipboard.md",
|
|
62
|
+
"docs/api/cmd.md",
|
|
63
|
+
"docs/api/colors.md",
|
|
64
|
+
"docs/api/constants.md",
|
|
65
|
+
"docs/api/decorators.md",
|
|
115
66
|
"docs/api/exceptions.md",
|
|
67
|
+
"docs/api/history.md",
|
|
68
|
+
"docs/api/parsing.md",
|
|
116
69
|
"docs/api/plugin.md",
|
|
117
|
-
"docs/api/
|
|
70
|
+
"docs/api/py_bridge.md",
|
|
118
71
|
"docs/api/rich_utils.md",
|
|
119
72
|
"docs/api/string_utils.md",
|
|
73
|
+
"docs/api/styles.md",
|
|
120
74
|
"docs/api/utils.md",
|
|
121
|
-
"docs/api/
|
|
122
|
-
"docs/api/
|
|
123
|
-
"docs/api/decorators.md",
|
|
124
|
-
"docs/api/history.md",
|
|
125
|
-
"docs/api/clipboard.md",
|
|
126
|
-
"docs/api/parsing.md",
|
|
127
|
-
"docs/api/cmd.md",
|
|
75
|
+
"docs/api/argparse_utils.md",
|
|
76
|
+
"docs/api/command_set.md",
|
|
128
77
|
"docs/api/completion.md",
|
|
78
|
+
"docs/api/pt_utils.md",
|
|
79
|
+
"docs/api/annotated.md",
|
|
129
80
|
"docs/api/index.md",
|
|
130
81
|
"docs/api/theme.md",
|
|
131
|
-
"docs/
|
|
132
|
-
"docs/
|
|
133
|
-
"docs/
|
|
134
|
-
"docs/
|
|
135
|
-
"docs/
|
|
82
|
+
"docs/examples/examples.md",
|
|
83
|
+
"docs/examples/index.md",
|
|
84
|
+
"docs/examples/alternate_event_loops.md",
|
|
85
|
+
"docs/examples/getting_started.md",
|
|
86
|
+
"docs/features/clipboard.md",
|
|
87
|
+
"docs/features/commands.md",
|
|
88
|
+
"docs/features/disable_commands.md",
|
|
89
|
+
"docs/features/embedded_python_shells.md",
|
|
90
|
+
"docs/features/multiline_commands.md",
|
|
91
|
+
"docs/features/packaging.md",
|
|
92
|
+
"docs/features/plugins.md",
|
|
93
|
+
"docs/features/redirection.md",
|
|
94
|
+
"docs/features/scripting.md",
|
|
95
|
+
"docs/features/shortcuts_aliases_macros.md",
|
|
96
|
+
"docs/features/table_creation.md",
|
|
97
|
+
"docs/features/async_commands.md",
|
|
98
|
+
"docs/features/help.md",
|
|
99
|
+
"docs/features/history.md",
|
|
100
|
+
"docs/features/hooks.md",
|
|
101
|
+
"docs/features/misc.md",
|
|
102
|
+
"docs/features/os.md",
|
|
103
|
+
"docs/features/startup_commands.md",
|
|
104
|
+
"docs/features/builtin_commands.md",
|
|
105
|
+
"docs/features/completion.md",
|
|
106
|
+
"docs/features/settings.md",
|
|
107
|
+
"docs/features/generating_output.md",
|
|
108
|
+
"docs/features/theme.md",
|
|
109
|
+
"docs/features/index.md",
|
|
110
|
+
"docs/features/argument_processing.md",
|
|
111
|
+
"docs/features/modular_commands.md",
|
|
112
|
+
"docs/features/annotated.md",
|
|
113
|
+
"docs/features/initialization.md",
|
|
114
|
+
"docs/features/prompt.md",
|
|
115
|
+
"docs/javascripts/readthedocs.js",
|
|
116
|
+
"docs/migrating/minimum.md",
|
|
117
|
+
"docs/migrating/incompatibilities.md",
|
|
118
|
+
"docs/migrating/next_steps.md",
|
|
119
|
+
"docs/migrating/why.md",
|
|
120
|
+
"docs/migrating/index.md",
|
|
121
|
+
"docs/mixins/index.md",
|
|
122
|
+
"docs/mixins/mixin_template.md",
|
|
123
|
+
"docs/overrides/main.html",
|
|
124
|
+
"docs/overview/index.md",
|
|
136
125
|
"docs/overview/resources.md",
|
|
137
126
|
"docs/overview/alternatives.md",
|
|
138
127
|
"docs/overview/integrating.md",
|
|
139
|
-
"docs/overview/index.md",
|
|
140
128
|
"docs/overview/installation.md",
|
|
141
129
|
"docs/stylesheets/cmd2.css",
|
|
130
|
+
"examples/.cmd2rc",
|
|
131
|
+
"examples/tmux_launch.sh",
|
|
132
|
+
"examples/tmux_split.sh",
|
|
133
|
+
"examples/README.md",
|
|
134
|
+
"examples/argparse_completion.py",
|
|
135
|
+
"examples/basic_completion.py",
|
|
136
|
+
"examples/color.py",
|
|
137
|
+
"examples/custom_types.py",
|
|
138
|
+
"examples/default_categories.py",
|
|
139
|
+
"examples/dynamic_commands.py",
|
|
142
140
|
"examples/event_loops.py",
|
|
143
141
|
"examples/exit_code.py",
|
|
142
|
+
"examples/help_categories.py",
|
|
144
143
|
"examples/hooks.py",
|
|
145
|
-
"examples/python_scripting.py",
|
|
146
|
-
"examples/color.py",
|
|
147
|
-
"examples/rich_theme.py",
|
|
148
|
-
"examples/getting_started.py",
|
|
149
|
-
"examples/dynamic_commands.py",
|
|
150
|
-
"examples/default_categories.py",
|
|
151
144
|
"examples/mixin.py",
|
|
152
|
-
"examples/pretty_print.py",
|
|
153
|
-
"examples/paged_output.py",
|
|
154
145
|
"examples/modular_commandsets.py",
|
|
155
|
-
"examples/argparse_example.py",
|
|
156
|
-
"examples/custom_parser.py",
|
|
157
|
-
"examples/migrating.py",
|
|
158
|
-
"examples/rich_tables.py",
|
|
159
|
-
"examples/README.md",
|
|
160
|
-
"examples/cmd_as_argument.py",
|
|
161
|
-
"examples/async_call.py",
|
|
162
|
-
"examples/hello_cmd2.py",
|
|
163
146
|
"examples/persistent_history.py",
|
|
164
|
-
"examples/
|
|
147
|
+
"examples/pretty_print.py",
|
|
148
|
+
"examples/python_scripting.py",
|
|
149
|
+
"examples/remove_builtin_commands.py",
|
|
165
150
|
"examples/remove_settable.py",
|
|
166
|
-
"examples/
|
|
167
|
-
"examples/
|
|
168
|
-
"examples/annotated_example.py",
|
|
151
|
+
"examples/rich_tables.py",
|
|
152
|
+
"examples/unicode_commands.py",
|
|
169
153
|
"examples/environment.py",
|
|
154
|
+
"examples/async_call.py",
|
|
170
155
|
"examples/async_commands.py",
|
|
171
|
-
"examples/
|
|
172
|
-
"examples/remove_builtin_commands.py",
|
|
173
|
-
"examples/unicode_commands.py",
|
|
174
|
-
"examples/argparse_completion.py",
|
|
175
|
-
"examples/.cmd2rc",
|
|
176
|
-
"examples/command_sets.py",
|
|
177
|
-
"examples/help_categories.py",
|
|
156
|
+
"examples/cmd_as_argument.py",
|
|
178
157
|
"examples/completion_item_choices.py",
|
|
158
|
+
"examples/migrating.py",
|
|
159
|
+
"examples/paged_output.py",
|
|
179
160
|
"examples/read_input.py",
|
|
180
|
-
"examples/
|
|
181
|
-
"examples/
|
|
161
|
+
"examples/rich_theme.py",
|
|
162
|
+
"examples/argparse_example.py",
|
|
163
|
+
"examples/command_sets.py",
|
|
164
|
+
"examples/custom_parser.py",
|
|
165
|
+
"examples/annotated_example.py",
|
|
166
|
+
"examples/async_printing.py",
|
|
167
|
+
"examples/getting_started.py",
|
|
168
|
+
"examples/hello_cmd2.py",
|
|
169
|
+
"examples/modular_commands/__init__.py",
|
|
182
170
|
"examples/modular_commands/commandset_basic.py",
|
|
171
|
+
"examples/modular_commands/commandset_complex.py",
|
|
183
172
|
"examples/modular_commands/commandset_custominit.py",
|
|
184
|
-
"examples/modular_commands/__init__.py",
|
|
185
|
-
"examples/scripts/quit.txt",
|
|
186
173
|
"examples/scripts/nested.txt",
|
|
187
|
-
"examples/scripts/
|
|
188
|
-
"examples/scripts/conditional.py",
|
|
174
|
+
"examples/scripts/quit.txt",
|
|
189
175
|
"examples/scripts/script.txt",
|
|
190
|
-
"examples/scripts/script.py",
|
|
191
176
|
"examples/scripts/arg_printer.py",
|
|
177
|
+
"examples/scripts/script.py",
|
|
178
|
+
"examples/scripts/conditional.py",
|
|
179
|
+
"examples/scripts/save_help_text.py",
|
|
192
180
|
"scripts/validate_tag.py",
|
|
193
|
-
"
|
|
194
|
-
".
|
|
195
|
-
"
|
|
196
|
-
"
|
|
197
|
-
"
|
|
198
|
-
"
|
|
199
|
-
"
|
|
200
|
-
"
|
|
201
|
-
"
|
|
202
|
-
"
|
|
203
|
-
"
|
|
204
|
-
"
|
|
205
|
-
"
|
|
206
|
-
"
|
|
207
|
-
"
|
|
208
|
-
"
|
|
209
|
-
"
|
|
210
|
-
"
|
|
211
|
-
"
|
|
212
|
-
"
|
|
213
|
-
"
|
|
214
|
-
"
|
|
215
|
-
"
|
|
216
|
-
"
|
|
217
|
-
"
|
|
218
|
-
"
|
|
219
|
-
"
|
|
220
|
-
"
|
|
221
|
-
"
|
|
222
|
-
"
|
|
223
|
-
"
|
|
224
|
-
"
|
|
225
|
-
"
|
|
226
|
-
"
|
|
181
|
+
"tests/.cmd2rc",
|
|
182
|
+
"tests/__init__.py",
|
|
183
|
+
"tests/relative_multiple.txt",
|
|
184
|
+
"tests/script.txt",
|
|
185
|
+
"tests/test_utils_defining_class.py",
|
|
186
|
+
"tests/script.py",
|
|
187
|
+
"tests/test_argparse_subcommands.py",
|
|
188
|
+
"tests/test_categories.py",
|
|
189
|
+
"tests/test_dynamic_complete_style.py",
|
|
190
|
+
"tests/test_future_annotations.py",
|
|
191
|
+
"tests/test_history.py",
|
|
192
|
+
"tests/test_parsing.py",
|
|
193
|
+
"tests/test_plugin.py",
|
|
194
|
+
"tests/test_py_completion.py",
|
|
195
|
+
"tests/test_string_utils.py",
|
|
196
|
+
"tests/conftest.py",
|
|
197
|
+
"tests/test_completion.py",
|
|
198
|
+
"tests/test_theme.py",
|
|
199
|
+
"tests/test_rich_utils.py",
|
|
200
|
+
"tests/test_run_pyscript.py",
|
|
201
|
+
"tests/test_argparse.py",
|
|
202
|
+
"tests/test_argparse_completer.py",
|
|
203
|
+
"tests/test_argparse_utils.py",
|
|
204
|
+
"tests/test_commandset.py",
|
|
205
|
+
"tests/test_utils.py",
|
|
206
|
+
"tests/test_annotated.py",
|
|
207
|
+
"tests/test_pt_utils.py",
|
|
208
|
+
"tests/test_cmd2.py",
|
|
209
|
+
"tests/pyscript/pyscript_dir.py",
|
|
210
|
+
"tests/pyscript/py_locals.py",
|
|
211
|
+
"tests/pyscript/echo.py",
|
|
212
|
+
"tests/pyscript/help.py",
|
|
213
|
+
"tests/pyscript/raises_exception.py",
|
|
214
|
+
"tests/pyscript/recursive.py",
|
|
215
|
+
"tests/pyscript/self_in_py.py",
|
|
216
|
+
"tests/pyscript/stop.py",
|
|
217
|
+
"tests/pyscript/environment.py",
|
|
218
|
+
"tests/pyscript/test_print.py",
|
|
219
|
+
"tests/scripts/binary.bin",
|
|
220
|
+
"tests/scripts/empty.txt",
|
|
221
|
+
"tests/scripts/help.txt",
|
|
222
|
+
"tests/scripts/nested.txt",
|
|
223
|
+
"tests/scripts/one_down.txt",
|
|
224
|
+
"tests/scripts/utf8.txt",
|
|
225
|
+
"tests/scripts/postcmds.txt",
|
|
226
|
+
"tests/scripts/precmds.txt"
|
|
227
227
|
]
|
|
228
228
|
}
|
|
@@ -13,7 +13,6 @@ import argparse
|
|
|
13
13
|
|
|
14
14
|
import cmd2
|
|
15
15
|
from cmd2 import (
|
|
16
|
-
Cmd2ArgumentParser,
|
|
17
16
|
CommandSet,
|
|
18
17
|
with_argparser,
|
|
19
18
|
with_category,
|
|
@@ -48,16 +47,16 @@ class CategoryApp(cmd2.Cmd):
|
|
|
48
47
|
"""A standard command defined in the child class."""
|
|
49
48
|
self.poutput("Application command executed")
|
|
50
49
|
|
|
51
|
-
@with_argparser(
|
|
52
|
-
def do_quit(self,
|
|
50
|
+
@with_argparser(cmd2.Cmd._build_quit_parser)
|
|
51
|
+
def do_quit(self, args: argparse.Namespace) -> bool | None:
|
|
53
52
|
"""Overriding a built-in command without a decorator moves it to our category."""
|
|
54
|
-
return super().do_quit(
|
|
53
|
+
return super().do_quit(args.cmd2_statement)
|
|
55
54
|
|
|
56
55
|
@with_category(cmd2.Cmd.DEFAULT_CATEGORY)
|
|
57
|
-
@with_argparser(
|
|
58
|
-
def do_shortcuts(self,
|
|
56
|
+
@with_argparser(cmd2.Cmd._build_shortcuts_parser)
|
|
57
|
+
def do_shortcuts(self, args: argparse.Namespace) -> None:
|
|
59
58
|
"""Overriding with @with_category(cmd2.Cmd.DEFAULT_CATEGORY) keeps it cmd2's category."""
|
|
60
|
-
super().do_shortcuts(
|
|
59
|
+
super().do_shortcuts(args.cmd2_statement)
|
|
61
60
|
|
|
62
61
|
|
|
63
62
|
if __name__ == "__main__":
|