Another interpretation: "He who tends a fig tree"—this is Joshua, as it is said, "And Joshua son of Nun, a youth, departed not from within the tent" (Exodus 33:11). "Shall eat its fruit"—as it is said, "Take Joshua" (Numbers 27:18), and it says, "And the LORD said to Joshua." This is what Scripture says: "A woman of valor is a crown to her husband" (Proverbs 12:4). "A woman of valor"—this is Sarah. "A crown to her husband"—Rabbi Chiyya said: her husband was crowned through her, but she was not crowned through her husband. The rabbis said: she was mistress over her husband. In every place the man decrees, but here "all that Sarah says to you, listen to her voice" (Genesis 21:12). Rabbi Yehoshua ben Korcha said: the yud that the Holy One, blessed be He, took from Sarai was divided—half to Sarah and half to Abraham. Rabbi Shimon ben Yochai said: the yud that the Holy One, blessed be He, took from Sarai went flying up before the throne of the Holy One, blessed be He. It said before Him, "Master of the universe, because I was the smallest of the letters You took me out of the name of a righteous woman!" He said to it, "Until now you were in the name of a female and at the end of the letters; now I will place you in the name of a male and at the head of the letters," as it is said, "And Moses called Hosea son of Nun, Joshua [Yehoshua]."
Joshua the Fig Tree and the Letter Taken from Sarah
Yalkut Shimoni on Nach 2:4
דבר אחר נוצר תאנה זה יהושע שנאמר ויהושע בן נון נער לא ימיש מתוך האהל. יאכל פריה שנאמר קח לך את יהושע, ואומר ויאמר ה' אל יהושע. זהו שאמר הכתוב אשת חיל עטרת בעלה. אשת חיל זו שרה, עטרת בעלה אמר רבי חייא בעלה נתעטר בה והיא לא נתעטרה בבעלה. רבנן אמרין מרתה לבעלה, בכל מקום האיש גוזר ברם הכא כל אשר תאמר אליך שרה שמע בקולה. א"ר יהושע בן קרחה יו"ד שנטל הקב"ה משרי נחלק חציו לשרה וחציו לאברהם. אמר רבי שמעון בן יוחאי יו"ד שנטל הקב"ה משרי היה טס ופורח לפני כסאו של הקב"ה אמר לפניו רבש"ע מפני שהייתי קטנה של אותיות הוצאתני משמה של צדקת אמר לה מתחלה היית בשמה של נקבה ובסוף האותיות עכשיו אני נותנך בשמו של זכר ובראש האותיות שנאמר ויקרא משה להושע בן נון יהושע.