R_API bool r_cmd_desc_has_handler(RCmdDesc *cd) {
	r_return_val_if_fail (cd, false);
	switch (cd->type) {
	case R_CMD_DESC_TYPE_ARGV:
		return cd->d.argv_data.cb;
	case R_CMD_DESC_TYPE_OLDINPUT:
		return cd->d.oldinput_data.cb;
	case R_CMD_DESC_TYPE_INNER:
		return false;
	case R_CMD_DESC_TYPE_GROUP:
		return cd->d.group_data.exec_cd && r_cmd_desc_has_handler (cd->d.group_data.exec_cd);
	}
	return false;
}
R_API bool r_cmd_desc_has_handler(RCmdDesc *cd) {
	r_return_val_if_fail (cd, false);
	switch (cd->type) {
	case R_CMD_DESC_TYPE_ARGV:
		return cd->d.argv_data.cb;
	case R_CMD_DESC_TYPE_OLDINPUT:
		return cd->d.oldinput_data.cb;
	case R_CMD_DESC_TYPE_INNER:
		return false;
	case R_CMD_DESC_TYPE_GROUP:
		return cd->d.group_data.exec_cd && r_cmd_desc_has_handler (cd->d.group_data.exec_cd);
	}
	return false;
}