וַיְהִ֗י בִּֽהְי֣וֹת יְהוֹשֻׁעַ֮ בִּירִיחוֹ֒ וַיִּשָּׂ֤א עֵינָיו֙ וַיַּ֔רְא וְהִנֵּה־אִישׁ֙ עֹמֵ֣ד לְנֶגְדּ֔וֹ וְחַרְבּ֥וֹ שְׁלוּפָ֖ה בְּיָד֑וֹ וַיֵּ֨לֶךְ יְהוֹשֻׁ֤עַ אֵלָיו֙ וַיֹּ֣אמֶר ל֔וֹ הֲלָ֥נוּ אַתָּ֖ה אִם־לְצָרֵֽינוּ׃
און עס איז געװען, אַז יהוֹשועַ איז געװען אין יריחו, האָט ער אױפֿגעהױבן זײַנע אױגן און געזען, ערשט אַ מאַן שטײט אַקעגן אים, מיט זײַן שװערד אַרױסגעצױגן אין זײַן האַנט. איז יהוֹשועַ צוגעגאַנגען צו אים, און האָט צו אים געזאָגט: ביסטו פֿאַר אונדז, אָדער פֿאַר אונדזערע פֿײַנט?
Rashi
When Yehoshua was in Yericho. From here we can learn that the outskirts of a city are considered part of the city itself, for it impossible to say that Yoshua was actually inside Yericho.14Since the Bnei Yisroel had not yet captured Yericho, he could not have been in the city itself.
Tze'enah Ure'enah
“Once when Joshua was near Jericho, he looked up and saw a man” [5:13]. When Joshua passed Jericho he saw an angel standing before him with a drawn sword. Joshua went up to him and said, have you come to help us or to fight with us? The angel responded: I am an angel of God. You have not seen me walking, but I have come down from heaven in an instant. Joshua immediately fell upon his face, bowed down and said to the angel, what do you desire? The angel said: take off your shoes; you are standing on holy ground. The angel said: I have come because you have abrogated the Torah.9Radak, Joshua, 5:13.