use different colors for sent and received commands
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user