Currently the flow for variable substition is:
1. Create Command Line Object
2. Substitute Variables
3. Recreate Command Line (kinda)
Unfortunately by creating the command line object first we lose important information required for doing the variable substitution (specifically quotes get split out).
It would be better if the builder itself did not create the command line object but just provided e.g the extecutable and the args (as strings). Which could get substituted and then processed into a command line.
This will change interfaces plugins deal with so should be backwards compatible and documented...