Emit command event when adding a command