David Kastrup [off-list ref] writes:
But doing a break inside of the while _condition_ rather than the body
just feels wrong to me.
Sorry, but that is not the issue on the thread is about.
BSD shell is failing the whole case statement when there is no
matching case arm.
Junio C Hamano [off-list ref] writes:
David Kastrup [off-list ref] writes:
quoted
But doing a break inside of the while _condition_ rather than the body
just feels wrong to me.
Sorry, but that is not the issue on the thread is about.
It is still relevant:
BSD shell is failing the whole case statement when there is no
matching case arm.
Sure, that is a bug. But in my opinion the idiom as such is ugly
enough not be worth keeping anyhow. The proposal of the patch
submitter was making an already ugly idiom even uglier for the sake of
his shell. I agree that this is not the way to go.
I was proposing replacing the idiom by something which I find cleaner.
That it will most likely work with the original poster's shell is more
or less a side effect. At least it is a side effect that might
motivate somebody else rather than me to do the cleanup work (and have
a buggy test shell to see whether he got everything indeed).
--
David Kastrup