def temporary_prompt(prompt) #:doc:
      raise Shells::NotRunning unless running?
      old_prompt = prompt_match
      begin
        self.prompt_match = prompt
        yield if block_given?
      ensure
        self.prompt_match = old_prompt
      end
    end
def temporary_prompt(prompt) #:doc:
      raise Shells::NotRunning unless running?
      old_prompt = prompt_match
      begin
        self.prompt_match = prompt
        yield if block_given?
      ensure
        self.prompt_match = old_prompt
      end
    end
Sets the prompt to the value temporarily for execution of the code block.