# Running iamroot on each prompt may be slow, since iamroot calls id which may need
# network traffic. So cache the answer so including it in the prompt doesn't make fish slow.
if not set -q __fish_prompt_iamroot
	set -g __fish_prompt_iamroot (iamroot; and echo yes; or echo no)
end

function prompt_iamroot
	echo $__fish_prompt_iamroot
end
