Set name when command object is passed.