bpkg-argument-grouping - Man Page

argument grouping facility


bpkg { options }+ argument +{ options }


For certain commands certain options and command line variables can be grouped to only apply to specific arguments. This help topic describes the argument grouping facility used for this purpose.

Groups can be specified before (leading) and/or after (trailing) the argument they apply to. A leading group starts with '{' and ends with '}+' while a trailing group starts with '+{' and ends with '}'. For example:

{ --foo --bar }+ arg   # 'arg' with '--foo' '--bar'
arg +{ fox=1 baz=2 }   # 'arg' with 'fox=1' 'baz=2'

Multiple leading and/or trailing groups can be specified for the same argument. For example:

{ -f }+ { -b }+ arg +{ f=1 } +{ b=2 } # 'arg' with '-f' 'b' 'f=1' 'b=2'

Note that the group applies to a single argument only. For example:

{ --foo }+ arg1  arg2 +{ --bar }  # 'arg1' with '--foo' and
                                  # 'arg2' with '--bar'

The group separators ('{', '}+', etc) must be separate command line arguments. In particular, they must not be adjacent either to the arguments inside the group nor to the argument they apply to. All such cases will be treated as ordinary arguments. For example:

{--foo}+ arg   # '{--foo}+' ...
arg+{ --foo }  # 'arg+{' ...

If one of the group separators needs to be specified as an argument verbatim, then it must be escaped with '\'. For example:

}             # error: unexpected group separator
}x            # '}x'
\}            # '}'
{ \}+ }+ arg  # 'arg' with '}+'


Send bug reports to the users@build2.org mailing list.

Referenced By

bpkg(1), bpkg-pkg-build(1), bpkg-pkg-clean(1), bpkg-pkg-install(1), bpkg-pkg-test(1), bpkg-pkg-uninstall(1), bpkg-pkg-update(1).

July 2020 bpkg 0.13.0