sindresorhus/pure — pull request #59 by psyrendust (2014-02-14 01:28:32+00:00)
Title: Simpler way to get length of prompt

Wrapping the `prompt_pure_preprompt` with zsh prompt escapes `%{ ... %}` will tell the shell to disregard the contained escape characters when determining the length of the prompt. So then it's just a matter of using simple array length syntax `${#prompt_pure_preprompt}` to figure out how many columns to move the cursor forward.