Christopher Wright wrote:
Andrei Alexandrescu wrote:
Georg Wrede wrote:
Should I be able to

$ rdmd --eval='printf("Yay, rdmd!")'


Yah. For my money, I can't fathom working in D without rdmd. Now with --eval and passable regexes it's even better because I can easily do tasks (from shell files) that would take longer in Perl.

Since the current source uses the not-yet-released phobos, I wanted to attach a binary so you can try it, but it's too big for the news server.


Andrei

It would be nice to have a config file that lets me specify the default imports and compiler (though this would make it slower). I can send you a patch for this, but I can't seem to build rdmd without modifications; it requires a struct File that has a method popen(string). I can change File to FILE* and make a few minor changes to get it to compile, which is what I did.

Anyway, my modifications look for a config file:
in /etc/
in /usr/local/etc
in the exe directory

Currently it just looks for default imports and the compiler name. Other things to add are compiler flags, and maybe dsss support.

The solution for getting the exe directory isn't included in phobos, as far as I could tell. Perhaps you'd like to change that.

This isn't quite ready yet, please ignore.

Also, getopt is killing --eval.

Reply via email to