aboutsummaryrefslogtreecommitdiff
path: root/bpkg/common-options.cli
blob: a8b36de2a69e22b026bbc173b32c5c6d77349d4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// file      : bpkg/common-options.cli
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license   : MIT; see accompanying LICENSE file

include <cstdint>;

namespace bpkg
{
  class common_options = 0
  {
    bool -v
    {
      "Print underlying commands being executed. This is equivalent to
       \cb{--verbose 2}."
    };

    bool -q
    {
      "Run quietly, only printing error messages. This is equivalent
       to \cb{--verbose 0}."
    };

    std::uint16_t --verbose = 1
    {
      "<level>",
      "Set the diagnostics verbosity to <level> between 0 (disabled) and
       5 (lots of information). The default is 1. @@ 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
    {
      "<file>",
      "Read additional options from <file> 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."
    };
  };
}