def _get_command(self, str_cmd):
    str_cmd = str_cmd.split()[0]
    return next((item for item in self.available_cmds if ((item.cmd_str == str_cmd) or (str_cmd in item.aliases))), None)
def _get_command(self, str_cmd):
    str_cmd = str_cmd.split()[0]
    return next((item for item in self.available_cmds if ((item.cmd_str == str_cmd) or (str_cmd in item.aliases))), None)