2 Thessalonians to  2 John

Avoiding those who reject commandments.

Shun, Don't Break Bread With

6We command you, my brothers, in the name of our master Joshua the anointed to shun every brother who leads an evil life and not in accord with the commandments which he received from us. 7For you know well how you ought to imitate us, for our behavior was not disorderly among you. 8We did not eat bread for nothing from any of you, but worked with hard labor and toiled night and day so that we might not be a burden to any of you; 9not because we did not have the right, but to make ourselves an example to you to follow us. 10For even when we were with you we commanded this very thing to you. That whoever is unwilling to work should likewise not eat. 2 Thessalonians 3:6-1011For we hear that there are some men among you who lead an evil life and do not work at all, but are busy-bodies. 12It is these people that we command and exhort by our master Joshua the anointed that they work quietly and eat their own bread. 13But you, brothers, do not be weary in well doing. 2 Thessalonians 3:11-1314If any man does not obey our word in this letter, note that man and do not associate with him, that he may be ashamed. 15Yet do not consider him an enemy, but admonish him as a brother. 2 Thessalonians 3:14-15 (2 Thessalonians 3:6-15 BRB)
4I rejoiced much that I found your children walking in the truth according to the commandment we have received from the father. 2 John 1:45Now I beg you lady, not as though I wrote a new commandment to you, but what we had from the beginning, FA that we love one another. 6This is love, that we walk according to his commandment. This commandment is according to what you heard from the beginning, in which you have been walking, 7because many deceivers went out into the world who do not confess that Joshua FA the anointed came in the flesh. FA This is the deceiver and antichrist. 2 John 1:5-78Beware in your souls that you do not lose those things that you have accomplished, but that you receive a full reward. FA 9All who pass and do not stay in the teaching of the anointed, god is not in. He who stays in his teaching has the father and the son. 10If a man comes to you and does not bring this teaching do not receive him into the house FA and, Rejoice to you, you will not speak to him. 11For he that says to him, Rejoice to you, is a partaker of his evil works. 2 John 1:8-11 (2 John 1:4-11 BRB)

In both passages those to be shunned have rejected commandments. Some have rejected the commandments of father god who sent his son Jesus. Some have rejected the commandments given through the apostles of Jesus. In both cases true disciples are to avoid them generally and not share a meal with them specifically (where a meal probably means a time of fellowship).