aboutsummaryrefslogtreecommitdiffstats
path: root/kirc.c
diff options
context:
space:
mode:
authormcpcpc <michaelczigler@icloud.com>2020-08-16 12:18:25 -0400
committermcpcpc <michaelczigler@icloud.com>2020-08-16 12:18:25 -0400
commitf0e912510d79950fb1fd616e4af2dcf4580180a3 (patch)
treef2a5271f77910b0f22d31d8a1104f88c7c90d1e4 /kirc.c
parentsquash commits related to commands and stabilty (diff)
downloadkirc-f0e912510d79950fb1fd616e4af2dcf4580180a3.tar.gz
kirc-f0e912510d79950fb1fd616e4af2dcf4580180a3.tar.bz2
kirc-f0e912510d79950fb1fd616e4af2dcf4580180a3.tar.xz
kirc-f0e912510d79950fb1fd616e4af2dcf4580180a3.tar.zst
kirc-f0e912510d79950fb1fd616e4af2dcf4580180a3.zip
colored command output
Diffstat (limited to '')
-rw-r--r--kirc.c5
1 files changed, 4 insertions, 1 deletions
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 <RETURN> key to quit...\x1b[0m", gutl, " ");