From 7d9d72d82a74cedfb6392cd854a101620aa064d5 Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Sun, 21 Feb 2016 22:33:36 +0100 Subject: [PATCH] Improve help output --- src/cryfs/cli/Environment.h | 7 ++++--- src/cryfs/cli/program_options/Parser.cpp | 18 +++++++++--------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/cryfs/cli/Environment.h b/src/cryfs/cli/Environment.h index 3b7cb9e5..2356e3f1 100644 --- a/src/cryfs/cli/Environment.h +++ b/src/cryfs/cli/Environment.h @@ -11,12 +11,13 @@ namespace cryfs { static bool isNoninteractive(); static bool noUpdateCheck(); - private: - Environment() = delete; - static const std::string FRONTEND_KEY; static const std::string FRONTEND_NONINTERACTIVE; static const std::string NOUPDATECHECK_KEY; + + private: + Environment() = delete; + }; } diff --git a/src/cryfs/cli/program_options/Parser.cpp b/src/cryfs/cli/program_options/Parser.cpp index 67a35fe7..0d81e3f1 100644 --- a/src/cryfs/cli/program_options/Parser.cpp +++ b/src/cryfs/cli/program_options/Parser.cpp @@ -2,6 +2,7 @@ #include "utils.h" #include #include +#include namespace po = boost::program_options; namespace bf = boost::filesystem; @@ -139,15 +140,14 @@ void Parser::_addPositionalOptionForBaseDir(po::options_description *desc, po::p _addAllowedOptions(&desc); cerr << desc << endl; cerr << "Environment variables:\n" - << " CRYFS_FRONTEND=noninteractive Work better together with tools.\n" - << " With this option set, CryFS won't ask\n" - << " anything, but use default values for any\n" - << " options you didn't specify on command line.\n" - << " Furthermore, it won't ask you to enter a new\n" - << " password a second time (password confirmation).\n" - << " CRYFS_NO_UPDATE_CHECK=true By default, CryFS connects to the internet to\n" - << " check for known security vulnerabilities and\n" - << " new versions. This option disables this.\n" + << " " << Environment::FRONTEND_KEY << "=" << Environment::FRONTEND_NONINTERACTIVE << "\n" + << "\tWork better together with tools.\n" + << "\tWith this option set, CryFS won't ask anything, but use default values\n" + << "\tfor options you didn't specify on command line. Furthermore, it won't\n" + << "\task you to enter a new password a second time (password confirmation).\n" + << " " << Environment::NOUPDATECHECK_KEY << "=true\n" + << "\tBy default, CryFS connects to the internet to check for known\n" + << "\tsecurity vulnerabilities and new versions. This option disables this.\n" << endl; exit(1); }