version 1.49, 2021/08/23 12:33:55 |
version 1.50, 2021/08/25 08:51:55 |
|
|
* Asks for confirmation before executing a command. |
* Asks for confirmation before executing a command. |
*/ |
*/ |
|
|
static enum cmd_retval cmd_confirm_before_exec(struct cmd *, |
static enum args_parse_type cmd_confirm_before_args_parse(struct args *, |
struct cmdq_item *); |
u_int, char **); |
|
static enum cmd_retval cmd_confirm_before_exec(struct cmd *, |
|
struct cmdq_item *); |
|
|
static int cmd_confirm_before_callback(struct client *, void *, |
static int cmd_confirm_before_callback(struct client *, void *, |
const char *, int); |
const char *, int); |
|
|
.name = "confirm-before", |
.name = "confirm-before", |
.alias = "confirm", |
.alias = "confirm", |
|
|
.args = { "bp:t:", 1, 1, NULL }, |
.args = { "bp:t:", 1, 1, cmd_confirm_before_args_parse }, |
.usage = "[-b] [-p prompt] " CMD_TARGET_CLIENT_USAGE " command", |
.usage = "[-b] [-p prompt] " CMD_TARGET_CLIENT_USAGE " command", |
|
|
.flags = CMD_CLIENT_TFLAG, |
.flags = CMD_CLIENT_TFLAG, |
|
|
struct cmdq_item *item; |
struct cmdq_item *item; |
struct cmd_list *cmdlist; |
struct cmd_list *cmdlist; |
}; |
}; |
|
|
|
static enum args_parse_type |
|
cmd_confirm_before_args_parse(__unused struct args *args, __unused u_int idx, |
|
__unused char **cause) |
|
{ |
|
return (ARGS_PARSE_COMMANDS_OR_STRING); |
|
} |
|
|
static enum cmd_retval |
static enum cmd_retval |
cmd_confirm_before_exec(struct cmd *self, struct cmdq_item *item) |
cmd_confirm_before_exec(struct cmd *self, struct cmdq_item *item) |