-
Notifications
You must be signed in to change notification settings - Fork 3
Add colours to status subcommand #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
src/subcommand/log_subcommand.cpp
Outdated
@@ -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; |
There was a problem hiding this comment.
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
!
src/subcommand/status_subcommand.cpp
Outdated
{ | ||
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; |
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
src/subcommand/status_subcommand.cpp
Outdated
if (sl.has_tobecommited_header()) | ||
{ | ||
stream_colour_fn colour = termcolor::green; |
There was a problem hiding this comment.
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.
Note to self: need to add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @SandrineP
Add colours to status subcommand