There is a bug in sysread from zsh/system. It triggers in the
following case:
1. zsh has been compiled with HAVE_SELECT and without HAVE_POLL.
2. sysread is called with timeout (-t).
3. the input file descriptor is valid but there is no data to read.
4. errno happens to be EINTR prior to the call to sysread.
This results in an infinite loop in sysread:
while ((ret = select(infd+1, (SELECT_ARG_2_T) &fds,
NULL, NULL,&select_tv)) < 1) {
if (errno != EINTR || errflag || retflag || breaks || contflag)
break;
}
Here select() keeps returning 0, indicating timeout. This is not an
error, so errno doesn't get set. If it was EINTR prior to the call,
it stays EINTR, and the loop keeps spinning.
As a workaround, powerlevel10k sets errno to ENOTTY (any value other
than EINTR will do) prior to calling sysread with timeout.
If the last right prompt line can be proven to always have
zero length after prompt expansion, we can unset RPROMPT
thus avoiding triggering zsh bugs related to ZLE_RPROMPT_INDENT=0.
Fixes#458.
- non-permanent content location (left or right)
- show current time
- prompt height (one or two lines)
- prompt spacing (with empty line between prompts or without)
- don't use typeset -p on zsh 5.4 as it's broken there
- remove redundant local declarations from _p9k_prompt_net_iface_async
- change the default value of POWERLEVEL9K_PUBLIC_IP_HOST as the old is broken