def _confirm_or_prompt_or_command(pymux, cli):
    """ True when we are waiting for a command, prompt or confirmation. """
    client_state = pymux.get_client_state(cli)
    if (client_state.confirm_text or client_state.prompt_command or
        client_state.command_mode):
        return True
