It's difficult to imagine Jesus telling his disciples to buy swords, considering that he would soon state,
". . . for all those who take up the sword shall perish by the sword." (Matthew 26:52, NASB).
"'Put your sword back in its place,' Jesus said to him, 'for all who draw the sword will die by the sword.'" (Matthew 26:52, NIV)
Also, it was late in the day, and Jesus and his disciples would soon leave for the Mount of Olives. Jesus had much to discuss with them before he would be taken prisoner, so there would be no time to go to the market, argue for the best value for their garments, then haggle over the price of swords.
It's interesting that Strong's Concordance doesn't even acknowledge the noun sword in Luke 22:36. Bishop Pearce believes the word has been inserted from what is said in verse 38, as it is evident Jesus never intended any resistance to his capture, nor to allow such a weapon to be used on the occasion.
But in Luke 22:38 Strong's Concordance acknowledges the Greek word μάχαιρα (machaira, Strong's Concordance #G3162) , defining it as a knife, dirk or sword.
If we back up to verse 35 we hear Jesus reminding his disciples that he had sent them on a temporary journey with neither purse nor passports, nor shoes (see Matthew 10:5-10). When he asked if they lacked anything during the trip, they answered, "Nothing."
But when Jesus was no longer with them, their journey would not be temporary. They would need certain provisions, including a knife for preparation of food, cutting wood for fuel, and possibly to fend off robbers for which the area was noted. So, once Jesus' ordeal was over, they should make sure they each had a knife.
In Luke 22:38 the disciples said they had two knives, and Jesus said, "It is enough." By this he may have been saying that's all they would need, but Bible commentators Adam Clarke and John Gill believe he was saying, "We've talked about this enough." They are likely correct since, according to Luke's account, he then left for the Mount of Olives where his real agony would begin (Luke 22:39). Discussion about swords would be insignificant in comparison.