def run(self):
        while True:
            try:
                document = self.cli.run()
                text = document.text
            except InputInterrupt:
                pass
            except (__HOLE__, EOFError):
                self.save_config()
                break
            else:
                if text.startswith('.'):
                    # These are special commands (dot commands) that are
                    # interpreted by the aws-shell directly and typically used
                    # to modify some type of behavior in the aws-shell.
                    result = self._dot_cmd.handle_cmd(text, application=self)
                    if result is EXIT_REQUESTED:
                        break
                else:
                    if text.startswith('!'):
                        # Then run the rest as a normally shell command.
                        full_cmd = text[1:]
                    else:
                        full_cmd = 'aws ' + text
                        self.history.append(full_cmd)
                    self.current_docs = u''
                    self.cli.buffers['clidocs'].reset(
                        initial_document=Document(self.current_docs,
                                                  cursor_position=0))
                    self.cli.request_redraw()
                    p = subprocess.Popen(full_cmd, shell=True, env=self._env)
                    p.communicate()
dataset/ETHPy150Open awslabs/aws-shell/awsshell/app.py/AWSShell.run