Use macro to register command attachments.