From d87ad35d372a98dfc7464bbf05a67157aefbb543 Mon Sep 17 00:00:00 2001 From: Jerzy Jamroz Date: Mon, 17 Feb 2025 13:25:36 +0100 Subject: [PATCH] feat: atInit presents its commands in the green colour. --- modules/libcom/src/iocsh/atInit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/libcom/src/iocsh/atInit.c b/modules/libcom/src/iocsh/atInit.c index c5bf6760b..85bd21a4c 100644 --- a/modules/libcom/src/iocsh/atInit.c +++ b/modules/libcom/src/iocsh/atInit.c @@ -42,7 +42,7 @@ static void atInitHook(const initHookState state) return; while ((item = (struct cmditem *)ellGet(&cmdList))) { - printf("%s\n", item->cmd); + printf(ANSI_GREEN("atInit:") " %s\n", item->cmd); if (iocshCmd(item->cmd)) printf(ERL_ERROR " atInit: " @@ -73,13 +73,13 @@ static void atInitFunc(const iocshArgBuf *args) if (initEndFlag) { printf(ERL_WARNING " atInit: " - "can only be used before iocInit (check help)\n"); + "can only be used before 'iocInit'\n"); return; } if (!cmd || !cmd[0]) { - printf(ERL_WARNING " atInit: " - "received an empty argument (check help)\n"); + printf(ERL_ERROR " atInit: " + "received an empty 'command' argument\n"); return; }