42 the king summoned Shimei and said to him, “Did I not make you swear by the LORD and warn you, ‘On the day you leave to go anywhere else, you can be sure you will die’? At that time you said to me, ‘What you say is good. I will obey.’

Read 1 Kings 2:42 Using Other Translations

And the king sent and called for Shimei, and said unto him, Did I not make thee to swear by the LORD, and protested unto thee, saying, Know for a certain, on the day thou goest out, and walkest abroad any whither, that thou shalt surely die? and thou saidst unto me, The word that I have heard is good.
the king sent and summoned Shimei and said to him, "Did I not make you swear by the LORD and solemnly warn you, saying, 'Know for certain that on the day you go out and go to any place whatever, you shall die'? And you said to me, 'What you say is good; I will obey.'
So the king sent for Shimei and demanded, “Didn’t I make you swear by the LORD and warn you not to go anywhere else or you would surely die? And you replied, ‘The sentence is fair; I will do as you say.’