Added filtering blank lines from history

pull/5191/head
Michael 'ASAP' Weinrich 2020-03-15 21:09:46 -07:00 zatwierdzone przez Ivan Grokhotkov
rodzic 8680394167
commit 8a2413b5c0
1 zmienionych plików z 6 dodań i 4 usunięć

Wyświetl plik

@ -173,12 +173,14 @@ void app_main(void)
if (line == NULL) { /* Break on EOF or error */
break;
}
/* Add the command to the history */
linenoiseHistoryAdd(line);
/* Add the command to the history if not empty*/
if(strlen(line) > 0) {
linenoiseHistoryAdd(line);
#if CONFIG_STORE_HISTORY
/* Save command history to filesystem */
linenoiseHistorySave(HISTORY_PATH);
/* Save command history to filesystem */
linenoiseHistorySave(HISTORY_PATH);
#endif
}
/* Try to run the command */
int ret;