(merge from head) Use the passed in command instead of a fixed one to account for custom and versioned commands. Thanks to Jurge Hunold for the report/patch.