From 87e476cf192b70c133a1bf00efa8586348326092 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 25 Nov 2015 09:19:19 +0200 Subject: New command line help setup --- bpkg/bpkg.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'bpkg/bpkg.cxx') diff --git a/bpkg/bpkg.cxx b/bpkg/bpkg.cxx index 85f6477..386d284 100644 --- a/bpkg/bpkg.cxx +++ b/bpkg/bpkg.cxx @@ -72,10 +72,10 @@ try // First parse common options and --version/--help. // - bpkg_options bo; - bo.parse (args, unknown_mode::stop); + options o; + o.parse (args, unknown_mode::stop); - if (bo.version ()) + if (o.version ()) { cout << "bpkg " << BPKG_VERSION_STR << "; " << "libbpkg " << LIBBPKG_VERSION_STR << endl @@ -84,13 +84,13 @@ try return 0; } - if (bo.help ()) + if (o.help ()) { help (help_options (), "", nullptr); return 0; } - const common_options& co (bo); + const common_options& co (o); // The next argument should be a command. // @@ -100,7 +100,7 @@ try int cmd_argc (2); char* cmd_argv[] {argv[0], const_cast (args.next ())}; - bpkg_commands cmd; + commands cmd; cmd.parse (cmd_argc, cmd_argv, true, unknown_mode::stop); if (cmd_argc != 1) @@ -125,7 +125,7 @@ try // First see if this is a command. // - cmd = bpkg_commands (); // Clear help option. + cmd = commands (); // Clear the help option. cmd.parse (cmd_argc, cmd_argv, true, unknown_mode::stop); // If not, then it got to be a help topic. -- cgit v1.1