CLI: don't print an arrow on exit

This commit is contained in:
Laila van Reenen 2024-04-13 15:43:42 +02:00
parent e267e6f907
commit dea1c8ae52
2 changed files with 7 additions and 3 deletions

View File

@ -3,6 +3,7 @@
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include "../FIFOBuff/FIFOBuffChar.h"
@ -76,9 +77,12 @@ int tryExecute(FIFOBuffChar_t* fifo)
if (cmd != NULL)
{
(*(cmd->fn))(line);
int ret = (*(cmd->fn))(line);
CLI_stringOut((char*)"> ");
if (ret != INT_MIN)
{
CLI_stringOut((char*)"> ");
}
return true;
}
else

View File

@ -3,7 +3,7 @@
typedef struct CMD_t {
char* cmd;
void (*fn)(char* line);
int (*fn)(char* line);
} CMD_t;
typedef struct CMDList_s {