CLI/Context

- Removed repeated header calls that display a reconstructed command line in
  the event that default.command is used.
This commit is contained in:
Paul Beckingham
2014-11-10 22:07:02 -05:00
parent 65ca1ab84d
commit 97428397a5
2 changed files with 18 additions and 19 deletions

View File

@@ -245,6 +245,24 @@ int Context::initialize (int argc, const char** argv)
cli.initialize (argc, argv);
cli.analyze (true, true);
// Extract a recomposed command line.
bool foundDefault = false;
std::string combined;
std::vector <A>::const_iterator a;
for (a = cli._args.begin (); a != cli._args.end (); ++a)
{
if (combined.length ())
combined += ' ';
combined += a->attribute ("raw");
if (a->hasTag ("DEFAULT"))
foundDefault = true;
}
if (foundDefault)
header ("[" + combined + "]");
////////////////////////////////////////////////////////////////////////////
//
// [8] Run on.launch hooks.