Created
May 18, 2018 15:42
-
-
Save juanibiapina/75617c2c060156d154115bcfdd297592 to your computer and use it in GitHub Desktop.
Measure time to render zsh prompt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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