--export has no default value anymore.
Some checks failed
continuous-integration/drone/push Build is failing

If --export had a default value, it would have to be called with
--export=FORMAT or -eFORMAT, while it was previously possible to call
it with --export FORMAT or -e FORMAT. This is counter-intuitive and
not backwards-compatible, so I reverted the change.
This commit is contained in:
tastytea 2019-07-21 17:15:55 +02:00
parent fe9555ec38
commit df535cc6fb
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@ remwharead - Saves URIs of things you want to remember in a database
*remwharead* [*-t* _tags_] [*-N*] _URI_
*remwharead* *-e* [_format_] [*-f* _file_] [*-T* _start_,_end_] [[*-s*|*-S*] _expression_]
*remwharead* *-e* _format_ [*-f* _file_] [*-T* _start_,_end_] [[*-s*|*-S*] _expression_]
== DESCRIPTION
@ -36,7 +36,7 @@ Add tags to _URI_, delimited by commas.
*-e* _format_, *--export* _format_::
Export to _format_. Possible values are _csv_, _asciidoc_, _bookmarks_ or
_simple_ (default). See _FORMATS_.
_simple_. See _FORMATS_.
*-f* _file_, *--file* _file_::
Save output to _file_. Default is stdout.

View File

@ -43,7 +43,7 @@ const options parse_options(const int argc, const char *argv[])
popl::OptionParser op("Available options");
op.add<popl::Value<string>>
("t", "tags", "Add tags to URI, delimited by commas.", "", &tags);
auto option_export = op.add<popl::Implicit<string>>
auto option_export = op.add<popl::Value<string>>
("e", "export", "Export to format.", "simple", &format);
op.add<popl::Value<string>>
("f", "file", "Save output to file.", "", &opts.file);
@ -70,7 +70,7 @@ const options parse_options(const int argc, const char *argv[])
{
cout << "Usage: " << argv[0] << " [-t tags] [-N] URI\n"
<< " " << argv[0]
<< " -e [format] [-f file] [-T start,end] "
<< " -e format [-f file] [-T start,end] "
<< "[[-s|-S] expression]\n";
cout << op;
return options(0);