# # # patch "cmd.cc" # from [b9a168907c2f31f809c83de113c1c3c8f13f3af3] # to [55ea2873fc7b91694ba9e2d51b3e89fe48c6cfa7] # # patch "cmd_db.cc" # from [0875bc8882c861722b83089736d55d53469fa0c7] # to [55e7fd67b2203264ced475ef0d62cd0216ca916e] # # patch "options_list.hh" # from [524f3fbf6acd6590e85dd1985305aaf256bf1203] # to [d2a0ffef99824aa91354c46c7dbbb20e7cd5f815] # ============================================================ --- cmd.cc b9a168907c2f31f809c83de113c1c3c8f13f3af3 +++ cmd.cc 55ea2873fc7b91694ba9e2d51b3e89fe48c6cfa7 @@ -514,7 +514,7 @@ CMD_NO_WORKSPACE(version, "version", "", E(args.empty(), origin::user, F("no arguments allowed")); - if (app.opts.full) + if (global_sanity.get_verbosity() > 0) print_full_version(); else print_version(); ============================================================ --- cmd_db.cc 0875bc8882c861722b83089736d55d53469fa0c7 +++ cmd_db.cc 55e7fd67b2203264ced475ef0d62cd0216ca916e @@ -61,7 +61,7 @@ CMD(db_info, "info", "", CMD_REF(db), "" F("no arguments needed")); database db(app); - db.info(cout, app.opts.full); + db.info(cout, global_sanity.get_verbosity() > 0); } CMD(db_version, "version", "", CMD_REF(db), "", @@ -501,7 +501,7 @@ CMD(complete, "complete", "", CMD_REF(in database db(app); project_t project(db); - bool verbose = app.opts.verbose; + bool verbose = global_sanity.get_verbosity() > 0; E(idx(args, 1)().find_first_not_of("abcdef0123456789") == string::npos, origin::user, ============================================================ --- options_list.hh 524f3fbf6acd6590e85dd1985305aaf256bf1203 +++ options_list.hh d2a0ffef99824aa91354c46c7dbbb20e7cd5f815 @@ -466,8 +466,6 @@ SIMPLE_OPTION(force_duplicate_key, "forc gettext_noop("force genkey to not error out when the named key " "already exists")) -SIMPLE_OPTION(full, "full", bool, - gettext_noop("print detailed information")) GLOBAL_SIMPLE_OPTION(help, "help,h", bool, gettext_noop("display help message")) @@ -616,11 +614,33 @@ OPTION(verbosity, inc_verbosity, false, } #endif +OPTSET(full) +OPTION(full, full, false, "full", + gettext_noop("print detailed information")) +#ifdef option_bodies +{ + if (verbosity < 1) + verbosity = 1; +} +#endif + +OPTSET(verbose) +OPTSET_REL(verbosity, verbose) +OPTION(verbose, verbose, false, "verbose/no-verbose", + gettext_noop("verbose completion output")) +#ifdef option_bodies +{ + if (verbosity < 1) + verbosity = 1; +} +#endif + OPTION(verbosity, quiet, false, "quiet", gettext_noop("suppress verbose, informational and progress messages")) #ifdef option_bodies { - verbosity = -1; + if (verbosity > -1) + verbosity = -1; } #endif @@ -684,9 +704,6 @@ SIMPLE_OPTION(unknown, "unknown", bool, SIMPLE_OPTION(unknown, "unknown", bool, gettext_noop("perform the operations for unknown files from workspace")) -SIMPLE_OPTION(verbose, "verbose/no-verbose", bool, - gettext_noop("verbose completion output")) - GLOBAL_SIMPLE_OPTION(version, "version", bool, gettext_noop("print version number, then exit"))