mirror of
https://github.com/flipperdevices/flipperzero-firmware.git
synced 2025-12-12 12:51:22 +04:00
[FL-3965] Separate cli_shell into toolbox (#4175)
* cli_shell: separate into toolbox * fix: cmd flags * fix formatting * cli: increase default stack depth * cli_shell: fix loader lock logic * cli: fix command flags * fix f18 * speaker_debug: fix * cli_registry: fix docs * ufbt: rename cli target back * cli: rename app and record * cli: fix and simplify help command * cli_master_shell: fix ext commands * fix formatting * cli: rename master to main * fix formatting --------- Co-authored-by: hedger <hedger@users.noreply.github.com>
This commit is contained in:
17
lib/toolbox/cli/cli_command.c
Normal file
17
lib/toolbox/cli/cli_command.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "cli_command.h"
|
||||
#include "cli_ansi.h"
|
||||
|
||||
bool cli_is_pipe_broken_or_is_etx_next_char(PipeSide* side) {
|
||||
if(pipe_state(side) == PipeStateBroken) return true;
|
||||
if(!pipe_bytes_available(side)) return false;
|
||||
char c = getchar();
|
||||
return c == CliKeyETX;
|
||||
}
|
||||
|
||||
void cli_print_usage(const char* cmd, const char* usage, const char* arg) {
|
||||
furi_check(cmd);
|
||||
furi_check(arg);
|
||||
furi_check(usage);
|
||||
|
||||
printf("%s: illegal option -- %s\r\nusage: %s %s", cmd, arg, cmd, usage);
|
||||
}
|
||||
Reference in New Issue
Block a user