[Machine] Umar used to swear, and then the Prophet ﷺ forbade him from doing so. He said, "Whoever swears by something other than Allah, he has committed shirk (associating partners with Allah)." The other person said, "So swearing is considered shirk."
كَانَ عُمَرُ يَحْلِفُ وَأَبِي فَنَهَاهُ النَّبِيُّ ﷺ قَالَ مَنْ حَلَفَ بِشَيْءٍ دُونَ اللهِ تَعَالَى فَقَدْ أَشْرَكَ وَقَالَ الْآخَرُ فَهُوَ شِرْكٌ