From f0e912510d79950fb1fd616e4af2dcf4580180a3 Mon Sep 17 00:00:00 2001 From: mcpcpc Date: Sun, 16 Aug 2020 12:18:25 -0400 Subject: colored command output --- README | 12 +++++++++--- kirc.c | 5 ++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README b/README index 57bfee1..fb024ba 100644 --- a/README +++ b/README @@ -36,9 +36,14 @@ INSTALLATION Building and installing from source: git clone https://github.com/mcpcpc/kirc.git - cd kirc - make - make install + tcd kirc + make + make install + +Building and installing using KISS Linux Community repository [2]: + + kiss b kirc + kiss i kirc USAGE @@ -77,3 +82,4 @@ REFERENCES [0] https://tools.ietf.org/html/rfc2812 [1] https://en.wikipedia.org/wiki/ANSI_escape_code +[2] https://github.com/kisslinux/community diff --git a/kirc.c b/kirc.c index e1776b8..e417947 100644 --- a/kirc.c +++ b/kirc.c @@ -200,7 +200,10 @@ main(int argc, char **argv) { pars(sl, sbuf); if (read(fd[0], u, cmax) > 0) { for (i = 0; u[i] != '\n'; i++) continue; - if (u[0] != ':') raw("%-*.*s\r\n", i, i, u); + if (u[0] != ':') { + raw("%-*.*s\r\n", i, i, u); + printf("\x1b[1A\x1b[K\x1b[36m%-*.*s\x1b[0m\n", i, i, u); + } } } printf("%*s \x1b[31mpress key to quit...\x1b[0m", gutl, " "); -- cgit v1.2.3