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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user