Kara-Moon Forum
April 19, 2024, 11:53:48 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: You can go back to the main site here: Kara-Moon site
 
   Home   Help Search Login Register  
Pages: 1 [2]
  Print  
Author Topic: mma-gb should read .mmarc  (Read 5145 times)
bvdp
Kara-Moon Master
****
Posts: 1437


WWW
« Reply #15 on: November 17, 2020, 05:30:21 PM »

Oh, I see what's happening ... and it's not a pretty answer  Evil

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 Smiley

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.
Logged

My online life: http://www.mellowood.ca
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.036 seconds with 19 queries.