He claimed that the Prophet ﷺ said, "Whoever eats garlic or onion, let him keep away from us," or he said, "let him keep away from our mosque and sit in his house."The Prophet ﷺ was once brought a pot containing some green vegetables. He detected an odor coming from it and asked about it, and was informed of the vegetables it contained. He said, "Bring it close to one of his companions who was with him." When the companion saw it, he disliked eating it. The Prophet ﷺ said, "Eat, for I converse privately with one with whom you do not converse."Ahmad bin Salih reported from Ibn Wahb that he was brought a badr. Ibn Wahb said, meaning a tray containing green vegetables. Layth and Abu Safwan, reporting from Yunus, did not mention the story of the pot, so I do not know whether it is from the words of Zuhri or part of the hadith itself.
حدثنا سعيد بن عفير قال حدثنا ابن وهب عن يونس عن ابن شهاب زعم عطاء أن
زعم أن النبي ﷺ قال من أكل ثوما أو بصلا فليعتزلنا أو قال فليعتزل مسجدنا وليقعد في بيته وأن النبي ﷺ أتي بقدر فيه خضرات من بقول فوجد لها ريحا فسأل فأخبر بما فيها من البقول فقال قربوها إلى بعض أصحابه كان معه فلما رآه كره أكلها قال كل فإني أناجي من لا تناجي وقال أحمد بن صالح عن ابن وهب أتي ببدر وقال ابن وهب يعني طبقا فيه خضرات ولم يذكر الليث وأبو صفوان عن يونس قصة القدر فلا أدري هو من قول الزهري أو في الحديث