[PATCH 1/5] [programs/cmd] Fix shortpath handling in for loops