16#define CLI_PLUGIN_API_VERSION 1
60 const char* search_directory;
61 const char* fal_prefix;
81void cli_print_usage(
const char* cmd,
const char* usage,
const char* arg);
83#define CLI_COMMAND_INTERFACE(name, execute_callback, flags, stack_depth, app_id) \
84 static const CliCommandDescriptor cli_##name##_desc = { \
91 static const FlipperAppPluginDescriptor plugin_descriptor = { \
93 .ep_api_version = CLI_PLUGIN_API_VERSION, \
94 .entry_point = &cli_##name##_desc, \
97 const FlipperAppPluginDescriptor* cli_##name##_ep(void) { \
98 return &plugin_descriptor; \
void cli_print_usage(const char *cmd, const char *usage, const char *arg)
Print unified cmd usage tip.
Definition cli_command.c:11
CliCommandFlag
Definition cli_command.h:18
@ CliCommandFlagDefault
Default.
Definition cli_command.h:19
@ CliCommandFlagInsomniaSafe
Safe to run with insomnia mode on.
Definition cli_command.h:21
@ CliCommandFlagUseShellThread
Don't start a separate thread to run the command in.
Definition cli_command.h:23
@ CliCommandFlagDontAttachStdio
Do no attach I/O pipe to thread stdio.
Definition cli_command.h:22
@ CliCommandFlagExternal
The command comes from a .fal file.
Definition cli_command.h:29
@ CliCommandFlagParallelSafe
Safe to run in parallel with other apps.
Definition cli_command.h:20
void(* CliCommandExecuteCallback)(PipeSide *pipe, FuriString *args, void *context)
CLI command execution callback pointer.
Definition cli_command.h:47
bool cli_is_pipe_broken_or_is_etx_next_char(PipeSide *side)
Detects if Ctrl+C has been pressed or session has been terminated.
Definition cli_command.c:4
Definition cli_command.h:49
Configuration for locating external commands.
Definition cli_command.h:59
There are two PipeSides per pipe.
Definition pipe.c:17