code: async def prompt(self, text=None):
          '''
          Prompt for user input from stdin.
          '''
          if self.sess is None:
              hist = FileHistory(s_common.getSynPath('cmdr_history'))
              self.sess = PromptSession(history=hist)
  
          if text is None:
              text = self.cmdprompt
  
          with patch_stdout():
              retn = await self.sess.prompt(text, async_=True, vi_mode=self.vi_mode, enable_open_in_editor=True)
              return retync def prompt(self, text=None):
          '''
          Prompt for user input from stdin.
          '''
          if self.sess is None:
              hist = FileHistory(s_common.getSynPath('cmdr_history'))
              self.sess = PromptSession(history=hist)
  
          if text is None:
              text = self.cmdprompt
  
          with patch_stdout():
              retn = await self.sess.prompt(text, async_=True, vi_mode=self.vi_mode, enable_open_in_editor=True)
              return retn
docs: Prompt for user input from stdin.