I want my zsh prompt to display whether the session has sudo rights (from a previously run
sudo command). After looking at the answers to this question, I arranged to use the exit status of
sudo -n true to determine whether the sudo timestamp is still valid.
This works as intended, however the command takes ca. 15 ms to complete. Actually all
sudo commands seem to have this overhead. This is not much, but I notice it and it bothers me. Given that this is not a computationally expensive operation, is there is a faster way to check this?