From Aquinas’s Catena Aurea:
Ambrose; . . . We must not then suppose that He ordered them to possess swords, but by the swords He points at the secret attack of the Jews. And hence it follows, For I say unto you, that what is written must be accomplished in me: and he was numbered with the transgressors.
Theophyl; While they were contending among themselves above concerning priority, He saith, it is not a time of dignities, but rather of danger and slaughter. Behold I even your master am led to a disgraceful death, to be reckoned with the transgressors. For these things which are prophesied of Me have an end, that is, a fulfillment. Wishing then to hint at a violent attack, He made mention of a sword, not altogether revealing it, lest they should be seized with dismay, nor did He entirely provide that they should not be shaken by these sudden attacks, but that afterwards recovering, they might marvel how He gave Himself up to the Passion, a ransom for the salvation of men.
Basil; Or the Lord does not bid them carry purse and scrip and buy a sword, but predicts that it should come to pass, that in truth the apostles, forgetful of the time of the Passion, of the gifts and law of their Lord, would dare to take up the sword. For often does the Scripture make use of the imperative form of speech in the place of prophecy.
Theophyl; Or He hereby foretells to them that they would incur hunger and thirst, which He implies by the scrip and sundry kinds of misery, which He intends by the sword.