וִֽיהוֹשֻׁ֣עַ בִּן־נ֗וּן מָלֵא֙ ר֣וּחַ חָכְמָ֔ה כִּֽי־סָמַ֥ךְ מֹשֶׁ֛ה אֶת־יָדָ֖יו עָלָ֑יו וַיִּשְׁמְע֨וּ אֵלָ֤יו בְּנֵֽי־יִשְׂרָאֵל֙ וַֽיַּעֲשׂ֔וּ כַּאֲשֶׁ֛ר צִוָּ֥ה יְהוָ֖ה אֶת־מֹשֶֽׁה׃
Y Josué hijo de Nun fué lleno de espíritu de sabiduría, porque Moisés había puesto sus manos sobre él: y los hijos de Israel le obedecieron, é hicieron como SEÑOR mandó á Moisés.
Ibn Ezra
full of the spirit of wisdom i.e., the spirit of God . This is borne out by for Moshe had laid his hands upon him (because nowhere else in Israel was one found upon whom he could rely).
Sforno
כאשר צוה ה' את משה, a reference to the fact that political decisions such as expansionary wars needed G’d’s confirmation, which was to be obtained by means of the urim vetumim in the breastplate of the High Priest, i.e. Eleazar, son of Aaron. We were told this in Numbers 27,21 when Joshua was appointed Moses’ successor. [This was an example of Joshua’s inferiority as a leader compared to Moses, who never had to resort to such indirect methods of receiving a message from G’d. Ed.]