Cut something
(self, ns: argparse.Namespace)
| 403 | |
| 404 | @cmd2.with_argparser(cut_parser) |
| 405 | def do_cut(self, ns: argparse.Namespace) -> None: |
| 406 | """Cut something""" |
| 407 | handler = ns.cmd2_subcmd_handler |
| 408 | if handler is not None: |
| 409 | # Call whatever subcommand function was selected |
| 410 | handler(ns) |
| 411 | self._cut_called = True |
| 412 | else: |
| 413 | # No subcommand was provided, so call help |
| 414 | self._cmd.pwarning("This command does nothing without sub-parsers registered") |
| 415 | self._cmd.do_help("cut") |
| 416 | |
| 417 | stir_parser = cmd2.Cmd2ArgumentParser() |
| 418 | stir_subparsers = stir_parser.add_subparsers(title="item", help="what to stir") |