www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - [upforgrabs] Integrate Igor Lesik's getoptEx?

reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Upon contacting him, Igor was kind enough to share the source of his 
getoptEx module here: http://d.puremagic.com/issues/show_bug.cgi?id=3780

It's a simple improvement to getopt that adds a descriptive help string 
for the program, and for each option adds one or more help lines.

Could someone work his code into an addition to std.getopt? I'm thinking 
of keeping the same name and using overloading. Please reply to this if 
you plan to work on this.


Thanks,

Andrei
Jun 15 2011
parent reply Jens Mueller <jens.k.mueller gmx.de> writes:
Andrei Alexandrescu wrote:
 Upon contacting him, Igor was kind enough to share the source of his
 getoptEx module here:
 http://d.puremagic.com/issues/show_bug.cgi?id=3780
 
 It's a simple improvement to getopt that adds a descriptive help
 string for the program, and for each option adds one or more help
 lines.
 
 Could someone work his code into an addition to std.getopt? I'm
 thinking of keeping the same name and using overloading. Please
 reply to this if you plan to work on this.
 
 
 Thanks,
I have already done this. Some time ago. I can create a pull request for his work. But I didn't like it much (too limited). That's why I wanted to extend it. But never found the time. getoptEx goes in the direction of something like gflags but it's still far away from it. Jens
Jun 15 2011
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
On 6/15/11 11:43 AM, Jens Mueller wrote:
 Andrei Alexandrescu wrote:
 Upon contacting him, Igor was kind enough to share the source of his
 getoptEx module here:
 http://d.puremagic.com/issues/show_bug.cgi?id=3780

 It's a simple improvement to getopt that adds a descriptive help
 string for the program, and for each option adds one or more help
 lines.

 Could someone work his code into an addition to std.getopt? I'm
 thinking of keeping the same name and using overloading. Please
 reply to this if you plan to work on this.


 Thanks,
I have already done this. Some time ago. I can create a pull request for his work. But I didn't like it much (too limited). That's why I wanted to extend it. But never found the time. getoptEx goes in the direction of something like gflags but it's still far away from it. Jens
If you could find a way to integrate that work without thwarting opportunity for future improvements, that would be great. getopt is not gflags but should be a good backend to a possible gflags-like utility. Andrei
Jun 15 2011
parent Jens Mueller <jens.k.mueller gmx.de> writes:
Andrei Alexandrescu wrote:
 On 6/15/11 11:43 AM, Jens Mueller wrote:
Andrei Alexandrescu wrote:
Upon contacting him, Igor was kind enough to share the source of his
getoptEx module here:
http://d.puremagic.com/issues/show_bug.cgi?id=3780

It's a simple improvement to getopt that adds a descriptive help
string for the program, and for each option adds one or more help
lines.

Could someone work his code into an addition to std.getopt? I'm
thinking of keeping the same name and using overloading. Please
reply to this if you plan to work on this.


Thanks,
I have already done this. Some time ago. I can create a pull request for his work. But I didn't like it much (too limited). That's why I wanted to extend it. But never found the time. getoptEx goes in the direction of something like gflags but it's still far away from it. Jens
If you could find a way to integrate that work without thwarting opportunity for future improvements, that would be great. getopt is not gflags but should be a good backend to a possible gflags-like utility.
Right. I'd like to have an easy way to define flags and let getopt do the parsing. I just rechecked the enhancement request and Igor updated it yesterday. I will create a pull request making Igor the author. Jens
Jun 15 2011