aboutsummaryrefslogtreecommitdiff
path: root/bdep/utility.cxx
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.cxx
parent8432e7eede97c2bb324c7b6578eaf9a1a2ae4282 (diff)
Support passing additional arguments to pkg-build in sync, init, new
Diffstat (limited to 'bdep/utility.cxx')
-rw-r--r--bdep/utility.cxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/bdep/utility.cxx b/bdep/utility.cxx
index 15fb599..98b6279 100644
--- a/bdep/utility.cxx
+++ b/bdep/utility.cxx
@@ -133,4 +133,23 @@ namespace bdep
? co.build ().string ().c_str ()
: "b" BDEP_EXE_SUFFIX;
}
+
+ void
+ scan_argument (strings& r, cli::group_scanner& s)
+ {
+ // Copy over the argument including the group.
+ //
+ using scanner = cli::scanner;
+ using group_scanner = cli::group_scanner;
+
+ r.push_back (group_scanner::escape (s.next ()));
+
+ scanner& gs (s.group ());
+ if (gs.more ())
+ {
+ r.push_back ("+{");
+ for (; gs.more (); r.push_back (group_scanner::escape (gs.next ()))) ;
+ r.push_back ("}");
+ }
+ }
}