feat: add some color
This commit is contained in:
parent
72f9204ea6
commit
5c8ed315f7
3 changed files with 10 additions and 1 deletions
8
config.h
8
config.h
|
@ -9,4 +9,12 @@
|
|||
|
||||
#define LINE_BUF_SIZE 1024
|
||||
|
||||
#define ANSI_COLOR_RED "\x1b[31m"
|
||||
#define ANSI_COLOR_GREEN "\x1b[32m"
|
||||
#define ANSI_COLOR_YELLOW "\x1b[33m"
|
||||
#define ANSI_COLOR_BLUE "\x1b[34m"
|
||||
#define ANSI_COLOR_MAGENTA "\x1b[35m"
|
||||
#define ANSI_COLOR_CYAN "\x1b[36m"
|
||||
#define ANSI_COLOR_RESET "\x1b[0m"
|
||||
|
||||
#endif
|
2
loop.c
2
loop.c
|
@ -17,7 +17,7 @@ int loop() {
|
|||
|
||||
char *line;
|
||||
char **args;
|
||||
printf("> ");
|
||||
printf(ANSI_COLOR_GREEN"> "ANSI_COLOR_RESET);
|
||||
line = readLine();
|
||||
args = splitLine(line);
|
||||
status = commandExec(args);
|
||||
|
|
1
loop.h
1
loop.h
|
@ -6,5 +6,6 @@
|
|||
*/
|
||||
#ifndef _LOOP_H_
|
||||
#define _LOOP_H_
|
||||
#include "config.h"
|
||||
int loop();
|
||||
#endif
|
Loading…
Reference in a new issue