From df535cc6fb999610919829fffcb8cc3acf803ca9 Mon Sep 17 00:00:00 2001 From: tastytea Date: Sun, 21 Jul 2019 17:15:55 +0200 Subject: [PATCH] --export has no default value anymore. 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. --- remwharead.1.adoc | 4 ++-- src/parse_options.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/remwharead.1.adoc b/remwharead.1.adoc index 527d67e..1243c04 100644 --- a/remwharead.1.adoc +++ b/remwharead.1.adoc @@ -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. diff --git a/src/parse_options.cpp b/src/parse_options.cpp index 60b0683..0f2beb2 100644 --- a/src/parse_options.cpp +++ b/src/parse_options.cpp @@ -43,7 +43,7 @@ const options parse_options(const int argc, const char *argv[]) popl::OptionParser op("Available options"); op.add> ("t", "tags", "Add tags to URI, delimited by commas.", "", &tags); - auto option_export = op.add> + auto option_export = op.add> ("e", "export", "Export to format.", "simple", &format); op.add> ("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);