diff --git a/lib/gis/parser_standard_options.c b/lib/gis/parser_standard_options.c index e80d5524884..5c3da23c7bf 100644 --- a/lib/gis/parser_standard_options.c +++ b/lib/gis/parser_standard_options.c @@ -947,12 +947,12 @@ struct Option *G_define_standard_option(int opt) Opt->key = "format"; Opt->type = TYPE_STRING; Opt->key_desc = "name"; - Opt->required = NO; + Opt->required = YES; Opt->label = _("Output format"); Opt->answer = "plain"; Opt->options = "plain,json"; - Opt->description = _("plain;Plain text output;" - "json;JSON (JavaScript Object Notation);"); + Opt->descriptions = _("plain;Plain text output;" + "json;JSON (JavaScript Object Notation);"); break; } diff --git a/vector/v.db.select/main.c b/vector/v.db.select/main.c index cf10332fdf6..24d419a71d5 100644 --- a/vector/v.db.select/main.c +++ b/vector/v.db.select/main.c @@ -119,18 +119,13 @@ int main(int argc, char **argv) _("GROUP BY conditions of SQL statement without 'group by' keyword"); options.group->guisection = _("Selection"); - options.format = G_define_option(); - options.format->key = "format"; - options.format->type = TYPE_STRING; - options.format->required = YES; - options.format->label = _("Output format"); + options.format = G_define_standard_option(G_OPT_F_FORMAT); options.format->options = "plain,csv,json,vertical"; options.format->descriptions = "plain;Configurable plain text output;" "csv;CSV (Comma Separated Values);" "json;JSON (JavaScript Object Notation);" "vertical;Plain text vertical output (instead of horizontal)"; - options.format->answer = "plain"; options.format->guisection = _("Format"); options.fsep = G_define_standard_option(G_OPT_F_SEP);