Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] ERR_EXIT with "for" loops and shell functions (Re: Bug report)



On Jan 2,  4:56pm, Peter Stephenson wrote:
}
} On Sat, 27 Dec 2014 16:32:20 -0800
} Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
} > The following patch attempts to fix all of this weirdness.
} 
} However, you must have found everything I did since the tests I added
} now pass. They're all just for status, nothing specific to ERR_EXIT
} or ERR_RETURN; I didn't find I needed to change anything there in the
} main code, just for the status value itself. They overlap with yours
} but that's no big deal. Here they are.

They don't really overlap with mine much at all, because they examine
the normal cases whereas I looked at the ERR_EXIT case.

This one:

} +  set --
} +  false
} +  for x; do
} +    print nothing executed
} +  done
} +0:Status 0 from for with implicit empty list

Makes me wonder if my similar test of "select" needs an explicit "set --"
as well?



Messages sorted by: Reverse Date, Date, Thread, Author