I wonder if we should combine this and commandFlags[] into one array of struct { flags, CmdFunc }, so that the lookup will fetch both things at once into cache.