Skip to content

Commit f0e9125

Browse files
committed
colored command output
1 parent cfd9b51 commit f0e9125

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

README

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,14 @@ INSTALLATION
3636
Building and installing from source:
3737

3838
git clone https://github.com/mcpcpc/kirc.git
39-
cd kirc
40-
make
41-
make install
39+
tcd kirc
40+
make
41+
make install
42+
43+
Building and installing using KISS Linux Community repository [2]:
44+
45+
kiss b kirc
46+
kiss i kirc
4247

4348

4449
USAGE
@@ -77,3 +82,4 @@ REFERENCES
7782

7883
[0] https://tools.ietf.org/html/rfc2812
7984
[1] https://en.wikipedia.org/wiki/ANSI_escape_code
85+
[2] https://github.com/kisslinux/community

kirc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,10 @@ main(int argc, char **argv) {
200200
pars(sl, sbuf);
201201
if (read(fd[0], u, cmax) > 0) {
202202
for (i = 0; u[i] != '\n'; i++) continue;
203-
if (u[0] != ':') raw("%-*.*s\r\n", i, i, u);
203+
if (u[0] != ':') {
204+
raw("%-*.*s\r\n", i, i, u);
205+
printf("\x1b[1A\x1b[K\x1b[36m%-*.*s\x1b[0m\n", i, i, u);
206+
}
204207
}
205208
}
206209
printf("%*s \x1b[31mpress <RETURN> key to quit...\x1b[0m", gutl, " ");

0 commit comments

Comments
 (0)