aboutsummaryrefslogtreecommitdiff
path: root/bdep/utility.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2018-05-10 06:43:44 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2018-05-10 06:43:44 +0200
commite3133aa9628858bcfe414f95731831b5962358c7 (patch)
tree0c892fa9a8b84c664e92f1874327d3faeeaab31a /bdep/utility.hxx
parent8432e7eede97c2bb324c7b6578eaf9a1a2ae4282 (diff)
Support passing additional arguments to pkg-build in sync, init, new
Diffstat (limited to 'bdep/utility.hxx')
-rw-r--r--bdep/utility.hxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/bdep/utility.hxx b/bdep/utility.hxx
index dc9e589..da491c3 100644
--- a/bdep/utility.hxx
+++ b/bdep/utility.hxx
@@ -184,6 +184,25 @@ namespace bdep
template <typename C>
bool
parse_command (cli::scanner& scan, C&);
+
+ // Scan and return/append arguments preserving grouping.
+ //
+ void
+ scan_argument (strings&, cli::group_scanner&);
+
+ inline void
+ scan_arguments (strings& r, cli::group_scanner& s)
+ {
+ for (; s.more (); scan_argument (r, s)) ;
+ }
+
+ inline strings
+ scan_arguments (cli::group_scanner& s)
+ {
+ strings r;
+ scan_arguments (r, s);
+ return r;
+ }
}
#include <bdep/utility.txx>