Improve logic for putting username/hostname in prompt.