From 661b8791b30b94e79d9d12ff433ae884a6c885b3 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Sat, 24 Apr 2021 09:50:05 +0200 Subject: [PATCH] fix errormessage for shell-commands --- src/console.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/console.cpp b/src/console.cpp index 821352617..033cf49e3 100644 --- a/src/console.cpp +++ b/src/console.cpp @@ -375,9 +375,11 @@ void EMSESPShell::add_console_commands() { serializeJsonPretty(doc, shell); shell.println(); return; + } else if (!ok) { + shell.println(F("Unknown command, value, or id.")); + shell.print(F("Available commands are: ")); + Command::show(shell, device_type); } - shell.print(F("Unknown command. Available commands are: ")); - Command::show(shell, device_type); }, [&](Shell & shell __attribute__((unused)), const std::vector & arguments) -> std::vector { if (arguments.size() == 0) {