'Parses the `prompt` string and returns the rendered version'

def render_prompt(self, prompt):

    prompt = prompt.strip("'").replace("\\'", "'")
    for colour in ansi.COLOURS_NAMED:
        if (('[%s]' % colour) in prompt):
            prompt = prompt.replace(('[%s]' % colour), ansiFormatter.cmdColourNamed(colour))
    prompt = prompt.replace('[R]', ansiFormatter.cmdReset())
    return prompt
