The Prophet ﷺ said, "When one of you passes through our mosque or our market carrying arrows, let him hold the arrowheads firmly in his palm so that he does not injure any Muslim with them," or he said, "let him grip the arrowheads."
حدثنا محمود بن غيلان حدثنا أبو أسامة عن بريد عن جده أبي بردة
عن النبي ﷺ قال إذا مر أحدكم في مسجدنا أو في سوقنا ومعه نبل فليمسك على نصالها بكفه أن تصيب أحدا من المسلمين بشيء أو فليقبض على نصالها
Bukhari narrated it in Fitan, chapter of the saying of the Prophet ﷺ, "Whoever carries weapons against us is not one of us," hadith 7075, and Muslim in Adab, chapter on the command regarding one who passes through a masjid or marketplace or elsewhere carrying weapons... etc., hadith 2615/124, from the hadith of Abu Usama with the same chain.