This allows command to process all parameters, including parameters starting
with "-".
}
i_assert(pargc == array_count(&opts)-1); /* opts is NULL-terminated */
+ if ((cctx->cmd->flags & CMD_FLAG_NO_OPTIONS) != 0) {
+ /* process -parameters as if they were regular parameters */
+ optind = 1;
+ return 0;
+ }
+
int c, li;
while ((c = getopt_long(argc, (char *const *)argv, str_c(optbuf),
array_front(&opts), &li)) > -1) {
CMD_FLAG_NONE = 0x0,
CMD_FLAG_HIDDEN = 0x1,
CMD_FLAG_NO_PRINT = 0x2,
+ /* Don't parse any -options for the command. */
+ CMD_FLAG_NO_OPTIONS = 0x4,
} doveadm_cmd_flag_t;
struct doveadm_cmd_param {