1bpkg-argument-grouping(1) General Commands Manual bpkg-argument-grouping(1)
2
3
4
6 bpkg-argument-grouping - argument grouping facility
7
9 bpkg { options }+ argument +{ options }
10
12 For certain commands certain options and command line variables can be
13 grouped to only apply to specific arguments. This help topic describes
14 the argument grouping facility used for this purpose.
15
16 Groups can be specified before (leading) and/or after (trailing) the
17 argument they apply to. A leading group starts with '{' and ends with
18 '}+' while a trailing group starts with '+{' and ends with '}'. For
19 example:
20
21 { --foo --bar }+ arg # 'arg' with '--foo' '--bar'
22 arg +{ fox=1 baz=2 } # 'arg' with 'fox=1' 'baz=2'
23
24 Multiple leading and/or trailing groups can be specified for the same
25 argument. For example:
26
27 { -f }+ { -b }+ arg +{ f=1 } +{ b=2 } # 'arg' with '-f' 'b' 'f=1' 'b=2'
28
29 Note that the group applies to a single argument only. For example:
30
31 { --foo }+ arg1 arg2 +{ --bar } # 'arg1' with '--foo' and
32 # 'arg2' with '--bar'
33
34 The group separators ('{', '}+', etc) must be separate command line
35 arguments. In particular, they must not be adjacent either to the argu‐
36 ments inside the group nor to the argument they apply to. All such
37 cases will be treated as ordinary arguments. For example:
38
39 {--foo}+ arg # '{--foo}+' ...
40 arg+{ --foo } # 'arg+{' ...
41
42 If one of the group separators needs to be specified as an argument
43 verbatim, then it must be escaped with '\'. For example:
44
45 } # error: unexpected group separator
46 }x # '}x'
47 \} # '}'
48 { \}+ }+ arg # 'arg' with '}+'
49
51 Send bug reports to the users@build2.org mailing list.
52
54 Copyright (c) 2014-2019 Code Synthesis Ltd
55
56 Permission is granted to copy, distribute and/or modify this document
57 under the terms of the MIT License.
58
59
60
61bpkg 0.12.0 November 2019 bpkg-argument-grouping(1)