But if I want 10 entries in the same menu the above begins to look ugly (I
also need to define 10 commands and 10 handlers). Further its error prone to
specify the command ID's manually and do the string matching. It would be
better if a list of available commands could be iterated.

Is there a better way to add multiple entries to a menu or do I need to
specify a single command and handler per entry?