Processes the input command, called by the cli event loop Args: * text: A string that represents the input command text. Returns: None.
(self, text)
| 370 | self.aws_cli.input_processor.process_keys() |
| 371 | |
| 372 | def _process_command(self, text): |
| 373 | """Processes the input command, called by the cli event loop |
| 374 | |
| 375 | Args: |
| 376 | * text: A string that represents the input command text. |
| 377 | |
| 378 | Returns: |
| 379 | None. |
| 380 | """ |
| 381 | if AwsCommands.AWS_COMMAND in text: |
| 382 | text = self.completer.replace_shortcut(text) |
| 383 | if self.handle_docs(text): |
| 384 | return |
| 385 | try: |
| 386 | if not self._handle_cd(text): |
| 387 | text = self._colorize_output(text) |
| 388 | # Pass the command onto the shell so aws-cli can execute it |
| 389 | subprocess.call(text, shell=True) |
| 390 | print('') |
| 391 | except KeyboardInterrupt as e: |
| 392 | self._handle_keyboard_interrupt(e, platform.system()) |
| 393 | except Exception as e: |
| 394 | self.log_exception(e, traceback, echo=True) |
| 395 | |
| 396 | def _create_cli(self): |
| 397 | """Creates the prompt_toolkit's CommandLineInterface. |