1bpkg-argument-grouping(1)   General Commands Manual  bpkg-argument-grouping(1)
2
3
4

NAME

6       bpkg-argument-grouping - argument grouping facility
7

SYNOPSIS

9       bpkg { options }+ argument +{ options }
10

DESCRIPTION

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 ex‐
19       ample:
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       The  group  applies to a single argument only unless multiple arguments
30       are themselves grouped with '{' and '}'. For example:
31
32       { --foo }+ arg1  arg2 +{ --bar }      # 'arg1' with '--foo'
33                                             # 'arg2' with '--bar'
34
35       { --foo }+ { arg1  arg2 } +{ --bar }  # 'arg1' with '--foo' '--bar'
36                                             # 'arg2' with '--foo' '--bar'
37
38       The group separators ('{', '}+', etc) must be separate command line ar‐
39       guments.  In  particular, they must not be adjacent either to the argu‐
40       ments inside the group nor to the argument  they  apply  to.  All  such
41       cases will be treated as ordinary arguments. For example:
42
43       {--foo}+ arg   # '{--foo}+' ...
44       arg+{ --foo }  # 'arg+{' ...
45
46       If  one  of  the  group separators needs to be specified as an argument
47       verbatim, then it must be escaped with '\'. For example:
48
49       }             # error: unexpected group separator
50       }x            # '}x'
51       \}            # '}'
52       { \}+ }+ arg  # 'arg' with '}+'
53

BUGS

55       Send bug reports to the users@build2.org mailing list.
56
58       Copyright (c) 2014-2021 the build2 authors.
59
60       Permission is granted to copy, distribute and/or modify  this  document
61       under the terms of the MIT License.
62
63
64
65bpkg 0.14.0                      October 2021        bpkg-argument-grouping(1)
Impressum