From 5c78c79b83283780d9494c8c127e3bc1aea83c73 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Fri, 15 Jan 2010 18:30:48 +0000 Subject: Used the new help features in Bu::OptParser. --- src/main.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index c0b8dd3..7637443 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -54,8 +54,9 @@ public: "loaded build config, including available targets."); addOption( slot( this, &Options::onListPlugins), "list-plugins", "List all available plugins."); + addHelpOption(); - addHelpBanner("The following options control general execution:"); + addHelpBanner("\nThe following options control general execution:"); addOption( sView, 'v', "view", sViews ); addOption( sConfig, 'f', "file", "Select a different config file." ); addOption( bClean, 'c', "Shorthand for running action 'clean'. If an " @@ -75,6 +76,11 @@ public: "You should probably never ever use this, it'll scare you." ); + setHelpDefault( "view", "=[view]" ); + setHelpDefault( "file", "=[file]" ); + setHelpDefault( "cache", "=[file]" ); + setHelpDefault( "chdir", "=[dir]" ); + setOverride( "no-env", "false" ); setOverride( "dot", "true" ); setOverride( "debug", "true" ); @@ -83,8 +89,6 @@ public: setOverride( 'c', "true" ); setOverride( "no-cache", "false" ); - addHelpOption(); - setNonOption( slot( this, &Options::onNonOption ) ); parse( argc, argv ); -- cgit v1.2.3