From 94c3574492b6db6ae8d5fbef717f8e6f92f1d402 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 2 Sep 2015 17:09:57 +0200 Subject: Command line options/commands/help infrastructure --- bpkg/common-options.cli | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 bpkg/common-options.cli (limited to 'bpkg/common-options.cli') diff --git a/bpkg/common-options.cli b/bpkg/common-options.cli new file mode 100644 index 0000000..326cf64 --- /dev/null +++ b/bpkg/common-options.cli @@ -0,0 +1,48 @@ +// file : bpkg/common-options.cli +// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +include ; + +namespace bpkg +{ + class common_options = 0 + { + bool -v + { + "Print actual commands being executed. This is equivalent to + \cb{--verbose 1}." + }; + + std::uint16_t --verbose = 0 + { + "", + "Set the diagnostics verbosity to which can be between 0 + (disabled) and 5 (lots of information). @@ Need to document + further." + }; + + // The following option is "fake" in that it is actually handled by + // argv_file_scanner. We have it here for documentation. + // + std::string --options-file + { + "", + "Read additional options from with each option appearing on a + separate line optionally followed by space and an option value. Empty + lines and lines starting with \cb{#} are ignored. Option values can + be enclosed in double (\cb{\"}) or single (\cb{'}) quotes to preserve + leading and trailing whitespaces as well as to specify empty values. + If the value itself contains trailing or leading quotes, enclose it + with an extra pair of quotes, for example \cb{'\"x\"'}. Non-leading + and non-trailing quotes are interpreted as being part of the option + value. + + The semantics of providing options in a file is equivalent to providing + the same set of options in the same order on the command line at the + point where the \cb{--options-file} option is specified except that + the shell escaping and quoting is not required. You can repeat this + option to specify more than one options file." + }; + }; +} -- cgit v1.1