Skip to content

Conversation

SandrineP
Copy link
Collaborator

Add colours to status subcommand

@@ -54,7 +54,7 @@ void print_commit(const commit_wrapper& commit, std::string m_format_flag)
signature_wrapper author = signature_wrapper::get_commit_author(commit);
signature_wrapper committer = signature_wrapper::get_commit_committer(commit);

std::cout << "\033[0;33m" << "commit " << buf << "\033[0m" << std::endl;
std::cout << message_colour.at("yellow") << "commit " << buf << message_colour.at("colour_close") << std::endl;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to see use of colour rather than color!

{
for (auto e: entries_to_print)
{
std::cout << e.status << e.item << std::endl;
if (is_long)
std::cout << colour << e.status << e.item << message_colour.at("colour_close") << std::endl;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this line be indented a few spaces? And the line 2 below this.

Copy link
Member

@ianthomas23 ianthomas23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've confirmed that this works well for me locally.

Just one tiny nit, otherwise good to merge.

if (sl.has_tobecommited_header())
{
stream_colour_fn colour = termcolor::green;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an unnecessary double space here.

@ianthomas23
Copy link
Member

Note to self: need to add termcolor-cpp to emscripten-forge recipe.

Copy link
Member

@ianthomas23 ianthomas23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @SandrineP

@ianthomas23 ianthomas23 merged commit a930ee2 into QuantStack:main Sep 5, 2025
1 check passed
@SandrineP SandrineP deleted the colours branch September 5, 2025 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants