-/* $OpenBSD: cmd-parse.y,v 1.47 2021/09/09 06:57:48 nicm Exp $ */
+/* $OpenBSD: cmd-parse.y,v 1.48 2021/09/10 08:52:46 nicm Exp $ */
/*
* Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com>
struct cmd_parse_command *last;
char *alias, *name, *cause;
+ if (pi->flags & CMD_PARSE_NOALIAS)
+ return (0);
memset(pr, 0, sizeof *pr);
first = TAILQ_FIRST(&cmd->arguments);
TAILQ_REMOVE(&cmd->arguments, arg, entry);
TAILQ_INSERT_TAIL(&last->arguments, arg, entry);
}
- cmd_parse_log_commands(cmds, __func__);
+ cmd_parse_log_commands(cmds, __func__);
+ pi->flags |= CMD_PARSE_NOALIAS;
cmd_parse_build_commands(cmds, pi, pr);
+ pi->flags &= ~CMD_PARSE_NOALIAS;
return (1);
}
pr->cmdlist = cmd_list_new();
return;
}
- cmd_parse_log_commands(cmds, __func__);
+ cmd_parse_log_commands(cmds, __func__);
/*
* Parse each command into a command list. Create a new command list
if (o3 >= '0' && o3 <= '7') {
ch = 64 * (ch - '0') +
8 * (o2 - '0') +
- (o3 - '0');
+ (o3 - '0');
yylex_append1(buf, len, ch);
return (1);
}