configurable color schemes: rename monochrome to black-and-white v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sat, 02 Jul 2022 15:21:59 +0200
branchv_0
changeset 41 e1339b8e838e
parent 40 59f3cb26bfe7
child 42 ca216de56ef0
configurable color schemes: rename monochrome to black-and-white (it is still up to date + names will start with different letter)
bash-completion.sh
src/CLIParser.h
src/Configuration.h
src/TabularPrefetchingHandler.h
--- a/bash-completion.sh	Fri Jul 01 23:38:15 2022 +0200
+++ b/bash-completion.sh	Sat Jul 02 15:21:59 2022 +0200
@@ -38,7 +38,7 @@
 	COLOR_SCHEMES=(
 		"greenish"
 		"amberish"
-		"monochrome"
+		"black-and-white"
 		"midnight"
 	)
 
--- a/src/CLIParser.h	Fri Jul 01 23:38:15 2022 +0200
+++ b/src/CLIParser.h	Sat Jul 02 15:21:59 2022 +0200
@@ -61,9 +61,9 @@
 	Configuration::ColorScheme parseColorScheme(const relpipe::reader::string_t& value) {
 		if (value == L"greenish") return Configuration::ColorScheme::Greenish;
 		else if (value == L"amberish") return Configuration::ColorScheme::Amberish;
-		else if (value == L"monochrome") return Configuration::ColorScheme::Monochrome;
+		else if (value == L"black-and-white") return Configuration::ColorScheme::BlackAndWhite;
 		else if (value == L"midnight") return Configuration::ColorScheme::Midnight;
-		else throw relpipe::cli::RelpipeCLIException(L"Unable to parse ColorScheme value: " + value + L" (expecting green-screen, monochrome or midnight)", relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
+		else throw relpipe::cli::RelpipeCLIException(L"Unable to parse ColorScheme value: " + value + L" (expecting greenish, amberish, midnight or black-and-white)", relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
 	}
 	
 	Configuration::TableStyle parseTableStyle(const relpipe::reader::string_t& value) {
--- a/src/Configuration.h	Fri Jul 01 23:38:15 2022 +0200
+++ b/src/Configuration.h	Sat Jul 02 15:21:59 2022 +0200
@@ -44,7 +44,7 @@
 	enum class ColorScheme {
 		Greenish,
 		Amberish,
-		Monochrome,
+		BlackAndWhite,
 		Midnight
 	};
 
--- a/src/TabularPrefetchingHandler.h	Fri Jul 01 23:38:15 2022 +0200
+++ b/src/TabularPrefetchingHandler.h	Sat Jul 02 15:21:59 2022 +0200
@@ -260,7 +260,7 @@
 			cs = ColorScheme();
 			cs.border = cs.ESC_YELLOW;
 			cs.value = cs.ESC_AMBER;
-		} else if (configuration.colorScheme == Configuration::ColorScheme::Monochrome) {
+		} else if (configuration.colorScheme == Configuration::ColorScheme::BlackAndWhite) {
 			cs = ColorScheme();
 			cs.border = cs.ESC_EMPTY;
 			cs.count = cs.ESC_EMPTY;