code: def register_event(self, event):
          
  
          self.log('Registering event hook:', event.cmd, event.thing,
                   pretty=True, lvl=verbose)
          self.hooks[event.cmd] = event.thing
docs: Registers a new command line interface event hook as command