1
0
forked from Alepha/Alepha

AutoRAII based stream adaptors.

This commit is contained in:
2024-04-03 16:28:55 -04:00
parent 435bd912a4
commit 83034c501f
3 changed files with 18 additions and 25 deletions

View File

@ -244,11 +244,7 @@ namespace Alepha::Hydrogen ::detail:: Console_m
--"dump-color-env-var"_option << []
{
std::cout << "export " << colorsEnv() << "-\"";
AutoRAII delimiters
{
[]{ std::cout << StartDelimitedList{ ":" }; },
[]{ std::cout << EndDelimitedList; }
};
auto scopedList= adaptStream( StartDelimitedList{ ":" }, std::cout );
for( const auto &[ name, sgr ]: colorVariables() )
{
std::cout << NextItem << name.name << "=" << sgr.code;