use different colors for sent and received commands

This commit is contained in:
Martin Michelsen
2022-04-03 23:35:11 -07:00
parent be69f26af5
commit 028078925d
6 changed files with 30 additions and 6 deletions
+5
View File
@@ -26,6 +26,7 @@ using namespace std;
FileContentsCache file_cache;
bool use_terminal_colors = false;
@@ -279,6 +280,10 @@ void drop_privileges(const string& username) {
int main(int, char**) {
signal(SIGPIPE, SIG_IGN);
if (isatty(fileno(stderr))) {
use_terminal_colors = true;
}
shared_ptr<ServerState> state(new ServerState());
shared_ptr<struct event_base> base(event_base_new(), event_base_free);