Finish 3744

This finishes the great pull request started by @mickaelandrieu in #3744.
Probably better as I didn't remember if I've tested this sample, thanks for the tip @WouterJ,
and thanks (again) @xabbuh to finish this: console arguments docs realy need this add :)