Number One commanded the Enterprise in Pike's absence in "The Cage"/"The Menagerie" (TOS) and Uhura took command in "The Lorelei Signal" (TAS). It could very well be true that none of the twelve or thirteen (possibly fewer at the time Kirk was given command, and also at the time of "Turnabout Intruder," if the ones lost during the course of the series had not all been replaced by then) ships of the Enterprise's type—which are what the writers of TOS specifically meant when they said "starships"—had female captains, thus lending support to Lester's perception of that small circle as a boys-only club, but there was clearly no actual regulation that categorically precluded women from command.
Just wanted to say, I like this as an explanation.

This controversy will never end.
It goes on and on, my friend.

