Oh, I see what's happening ... and it's not a pretty answer
The problem is simple: the option parser handles the printing of the help requested by -I<name>. And, this is long before any env variables are set or RC files are read.
There are some "solutions" that I can see:
- Simply leave it as is and document the behavior. This is my preferred option
since it leaves working code working. I could also suggest that the -I<plugin>
function can be accessed from a file ...
- Have the option set a flag and handle that in main after the RC file is read and
the env variables are handled. I _think_ it could be done right after the reading
of the initial RC file around line 103 of main.py. My niggly here is the creation of
one-more-flag ... and I hate using one-shot flags ... but that's probably not the
end of the world. HOWEVER, we also have the other problem on not having an
input filename. One more test and workaround
Comment: would it make sense to have a special filename signaling that no input is expected? I'm thinking that this might set the input filename and setting the nooutput (mma -n) flag at the same time. Maybe force stdin if no filename is set? Sounds like ugly musing.
Question: how important is this feature?
I think there is a design flaw in the way options are handled: Comments/ideas/input are needed.