sindresorhus/pure — pull request #58 by psyrendust (2014-02-13 19:35: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.