oh-my-zsh's prompt is slow: how to fix this
34
votes
7
answers
58491
views
I'm using macOS 10.15.2 with iTerm2, zsh 5.7.1 and oh-my-zsh (theme robbyrussell).
I noticed that the prompt print is slightly slow respect to the bash one. For example, if I press enter, cursor initially goes at the beginning of the next line then, after a little while, the shell prompt comes in and the cursor is moved to its natural position. For example, if
→ ~
is the prompt when I'm in my home folder, and []
is my cursor, when I press enter I see:
**0 - Idle status**
→ ~ []
**1 - Immediately after pressing enter**
[]
**2 - Back to idle status**
→ ~ []
This slowness is particularly evident when I quickly press enter multiple times. In this case, I see some blank lines. This is what I see
→ ~
→ ~
→ ~
→ ~
→ ~
→ ~
→ ~
→ ~
→ ~ []
I come from bash shell and when I use bash, there is not such a slowness. I'm not sure this is an issue of oh-my-zsh or its natural behavior. I'd like to know more about this and, eventually, how to fix it. Thanks.
**PS**: the problem comes from oh-my-zsh and it persists even if I disable all the plugins.
**PPS**: I previously posted this question on SO. Thanks to user1934428 for his help and for suggesting me to move this question here.
Asked by floatingpurr
(485 rep)
Feb 5, 2020, 01:07 PM
Last activity: Dec 7, 2024, 02:23 AM
Last activity: Dec 7, 2024, 02:23 AM