Skip to content

Instantly share code, notes, and snippets.

@juanibiapina
Created May 18, 2018 15:42
Show Gist options
  • Save juanibiapina/75617c2c060156d154115bcfdd297592 to your computer and use it in GitHub Desktop.
Save juanibiapina/75617c2c060156d154115bcfdd297592 to your computer and use it in GitHub Desktop.
Measure time to render zsh prompt
typeset -F SECONDS start
precmd () {
start=$SECONDS
}
zle-line-init () {
PREDISPLAY="[$(( $SECONDS - $start ))] "
}
zle -N zle-line-init
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment