[PATCH 1/5] [programs/cmd] REBASE+RESEND: Fix shortpath handling in for loops