I probably should make it so it automatically wraps the code in a main function for even easier and more script like usage.

Rdmd already has this functionality with the --eval flag. You are supposed to pass the code as a command line parameter, but you can use it with files like this:

cat - test.d <<< "--eval=" | xargs -0 rdmd

I've only tried this on Linux.

Reply via email to