Thanks. I wasn't nervous: I was fed up. And for medical reasons I'm less patient these days than I might otherwise have been. I would hope that if he'd said it in a joking tone that I wouldn't have been as blunt, but it wasn't a joking tone (regardless of the intent) so I didn't feel inclined to accept it any longer.
I don't quite know myself: it wasn't shouted and it didn't have that extra resonance of a "command voice". But yeah, he is ex-military and my long hair might plausibly be at odds with his personal views as to what a man should look like.
The incident was a bit wearing, though: some people thrive on confrontation, but I don't.