static struct option base_opts[] = {
{ .name = "match", .has_arg = 1, .val = 'm' },
{ .name = "jump", .has_arg = 1, .val = 'j' },
- { .name = "append", .has_arg = 1, .val = 'A' },
{ NULL }
};
optind = 0;
opterr = 0;
- while ((optc = getopt_long(r->argc, r->argv, "m:j:", g->opts, NULL)) != -1)
+ while ((optc = getopt_long(r->argc, r->argv, "-:m:j:", g->opts,
+ NULL)) != -1)
{
switch (optc)
{
case 1:
if ((optarg[0] == '!') && (optarg[1] == '\0'))
{
+ optarg[0] = '\0';
inv = true;
continue;
}