Call read_input to use custom history and completer function.
(self, _)
| 72 | |
| 73 | @cmd2.with_category(EXAMPLE_COMMANDS) |
| 74 | def do_custom_completer(self, _) -> None: |
| 75 | """Call read_input to use custom history and completer function.""" |
| 76 | self.poutput("Tab completing paths and using custom history") |
| 77 | try: |
| 78 | input_str = self.read_input("> ", history=self.custom_history, completer=cmd2.Cmd.path_complete) |
| 79 | self.custom_history.append(input_str) |
| 80 | except EOFError: |
| 81 | pass |
| 82 | |
| 83 | @cmd2.with_category(EXAMPLE_COMMANDS) |
| 84 | def do_custom_parser(self, _) -> None: |
nothing calls this directly
no test coverage detected