kevinohara80/dmc

anon scripts arguments

kevinohara80 opened this issue · 1 comments

It would be super cool to be able to pass command line arguments to an anon script. These could be merged like so...

myscript.apex

Integer num = {{num}}; // merge argument
Integer type = '{{type}}'; // merge argument

List<Account> accs = new List<Account>();

if(type == 'Account') {
  for(Integer i=0; i<num; i++) {
    // do stuff
  }
}

running dmc anon with arguments

$ dmc anon -f myscript.apex --num 6 --type Account

Implemented in 1.0.0-25