If it was a commandment however, it means Joseph knowingly did something which he knew would or should PROHIBIT him from ever seeing his family again, or ever making it to the celestial, or receiving his "inheritance" and living in the celestial kingdom, etc. And that means he was not a "righteous man" at all, doesn't it?
Cabdullahi Yusuf wax aan daku hore uga dheregsanayn lagama sheego ilaa iyo hadda, war yaan ogeyn inuu muddo badan xukun doon ahaa? miyaan la ogeyn qabiilka uu ka dhashay, miyaan la ogeyn inuu xiriir aad u dhow la leeyahay Ethiopia, miyaan la ogeyn inuu askari macanggaga yahay, intaas oo dhan ama ka badan ayaa cabdullaahi dadku ka yaqaanaan, war la qabaana xiiso ma leh.