[FL-1555] Cli: update motd (#584)

* Cli: update motd
* Cli: autocomplete and cursor.
* Cli: one line history.
* Cli: minor cleanup, remove double flush, remove prompt on empty autocomplete
This commit is contained in:
あく
2021-07-17 17:14:34 +03:00
committed by GitHub
parent 30ae16c2e1
commit fbb81483ae
3 changed files with 202 additions and 84 deletions

View File

@@ -94,7 +94,6 @@ void cli_command_help(Cli* cli, string_t args, void* context) {
(void)args;
printf("Commands we have:");
furi_check(osMutexAcquire(cli->mutex, osWaitForever) == osOK);
// Get the middle element
CliCommandTree_it_t it_mid;
uint8_t cmd_num = CliCommandTree_size(cli->commands);
@@ -113,7 +112,6 @@ void cli_command_help(Cli* cli, string_t args, void* context) {
ref = CliCommandTree_ref(it_j);
printf(string_get_cstr(ref->key_ptr[0]));
};
furi_check(osMutexRelease(cli->mutex) == osOK);
if(string_size(args) > 0) {
cli_nl();