From 3edc863806c5d5715b5c44adedac4ec618552b0c Mon Sep 17 00:00:00 2001 From: okhsunrog Date: Fri, 23 Feb 2024 14:17:58 +0300 Subject: [PATCH] clear history command --- components/console | 2 +- main/cmd_utils.c | 2 ++ sdkconfig.defaults | 3 +-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/components/console b/components/console index 9d07876..2782b9d 160000 --- a/components/console +++ b/components/console @@ -1 +1 @@ -Subproject commit 9d0787667cc3dd42c19786cf89def59b3f432ed3 +Subproject commit 2782b9db6a22df017e3fd74092f93bd624a21e6e diff --git a/main/cmd_utils.c b/main/cmd_utils.c index 185341c..557b2ad 100644 --- a/main/cmd_utils.c +++ b/main/cmd_utils.c @@ -1,5 +1,6 @@ #include "cmd_utils.h" #include "esp_log.h" +#include "esp_vfs.h" #include "inttypes.h" #include "string.h" #include "esp_console.h" @@ -58,6 +59,7 @@ static void register_timestamp(void) { static int clrhistory(int argc, char **argv) { linenoiseHistoryFree(); + unlink(HISTORY_PATH); linenoiseHistoryLoad(HISTORY_PATH); return 0; } diff --git a/sdkconfig.defaults b/sdkconfig.defaults index 79a6452..44a53d7 100644 --- a/sdkconfig.defaults +++ b/sdkconfig.defaults @@ -2,8 +2,7 @@ CONFIG_PARTITION_TABLE_CUSTOM=y CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" -# CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y -# CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE=y +CONFIG_ESPTOOLPY_HEADER_FLASHSIZE_UPDATE=y # UART CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y