On 11/11/22 20:40, Eric Blake wrote:
This refactoring is big enough that I decided to split it into two
separate patches: one to add the return value and get rid of all the
redundant switch statements, the other to add the new enum values.
Great, I didn't dare suggest it, but it's certainly what I thought would
be best ;)
> What's the deal with <<\EOF, why not just <<EOF?
Habit. Writing python code in a shell heredoc is a lot easier when
you don't have to also worry about ` and $ expansions being performed
by the shell. Even if this particular python code avoided the
problematic characters.
Haha, TIL :) I've been missing the following from POSIX all this time:
"If no characters in word are quoted, all lines of the here-document
shall be expanded for parameter expansion, command substitution, and
arithmetic expansion"
(I mean I've been aware of the substitutions in here-documents, but not
of the way to prevent it! :))
I've perhaps taken a bit of liberty by preserving your R-b even
after
splitting the patch into two, but the series is now pushed as
242757dd..b1ba5275
I think the split has been a great improvement!
Laszlo