From 393ab18520eb5019d00822ae744a4d4e65304226 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 8 Dec 2022 10:52:04 +0200 Subject: Add --[no]diag-color options (infrastructure only) --- bpkg/utility.hxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'bpkg/utility.hxx') diff --git a/bpkg/utility.hxx b/bpkg/utility.hxx index 342d608..1f5c725 100644 --- a/bpkg/utility.hxx +++ b/bpkg/utility.hxx @@ -152,9 +152,17 @@ namespace bpkg dir_path current_directory (); - // Progress. + // Diagnostics. // - extern bool stderr_term; // True if stderr is a terminal. + // If stderr is not a terminal, then the value is absent (so can be used as + // bool). Otherwise, it is the value of the TERM environment variable (which + // can be NULL). + // + extern optional stderr_term; + + // True if the color can be used on the stderr terminal. + // + extern bool stderr_term_color; // Y/N prompt. See butl::yn_prompt() for details (this is a thin wrapper). // -- cgit v1.1