forked from espressif/esp-idf
Added filtering blank lines from history
This commit is contained in:
committed by
Ivan Grokhotkov
parent
8680394167
commit
8a2413b5c0
@@ -173,12 +173,14 @@ void app_main(void)
|
|||||||
if (line == NULL) { /* Break on EOF or error */
|
if (line == NULL) { /* Break on EOF or error */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* Add the command to the history */
|
/* Add the command to the history if not empty*/
|
||||||
linenoiseHistoryAdd(line);
|
if(strlen(line) > 0) {
|
||||||
|
linenoiseHistoryAdd(line);
|
||||||
#if CONFIG_STORE_HISTORY
|
#if CONFIG_STORE_HISTORY
|
||||||
/* Save command history to filesystem */
|
/* Save command history to filesystem */
|
||||||
linenoiseHistorySave(HISTORY_PATH);
|
linenoiseHistorySave(HISTORY_PATH);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
/* Try to run the command */
|
/* Try to run the command */
|
||||||
int ret;
|
int ret;
|
||||||
|
Reference in New Issue
Block a user