From 7341451d4c2a8a1b0df8af7a6bb0d8111f3a3ffd Mon Sep 17 00:00:00 2001 From: Stephane Del Pino <stephane.delpino44@gmail.com> Date: Fri, 1 Nov 2024 00:11:28 +0100 Subject: [PATCH] Add a --color/--no-color flag to pugs_checkpoint This is mainly for the documentation --- src/utils/checkpointing/pugs_checkpoint_main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/checkpointing/pugs_checkpoint_main.cpp b/src/utils/checkpointing/pugs_checkpoint_main.cpp index 982b11159..5373923d0 100644 --- a/src/utils/checkpointing/pugs_checkpoint_main.cpp +++ b/src/utils/checkpointing/pugs_checkpoint_main.cpp @@ -15,6 +15,9 @@ main(int argc, char* argv[]) app.description("A collection of simple tools to manage checkpoint/resume files for pugs."); app.add_option("filename", filename, "pugs checkpoint file (HDF5)")->check(CLI::ExistingFile)->required(); + bool enable_color = true; + app.add_flag("--color,!--no-color", enable_color, "Colorize console output [default: true]"); + bool print_info = false; auto info_flag = app.add_flag("--info", print_info, "Print checkpoints info"); @@ -37,7 +40,7 @@ main(int argc, char* argv[]) } parallel::Messenger::create(argc, argv); - ConsoleManager::init(true); + ConsoleManager::init(enable_color); try { if (*info_flag) { -- GitLab