runtime: command: add an arg to begin_processing() to indicate pipeline position

This commit is contained in:
2026-06-13 13:40:20 +01:00
parent de5058e045
commit 4c04ca6de8
6 changed files with 65 additions and 20 deletions
@@ -8,6 +8,13 @@
FX_DECLS_BEGIN;
enum bshell_command_position {
BSHELL_COMMAND_POSITION_SINGLE = 0,
BSHELL_COMMAND_POSITION_BEGINNING,
BSHELL_COMMAND_POSITION_MIDDLE,
BSHELL_COMMAND_POSITION_END,
};
struct bshell_runtime;
#define BSHELL_TYPE_COMMAND (bshell_command_get_type())
@@ -24,7 +31,9 @@ FX_TYPE_CLASS_DECLARATION_BEGIN(bshell_command)
*c_get_description)(const bshell_command *, fx_string *);
enum bshell_status (
*c_get_description_static)(const fx_type *, fx_string *);
enum bshell_status (*c_begin_processing)(bshell_command *);
enum bshell_status (*c_begin_processing)(
bshell_command *,
enum bshell_command_position);
enum bshell_status (*c_process_record)(
bshell_command *,
FX_TYPE_FWDREF(bshell_pipeline) * pipeline,
@@ -47,9 +56,11 @@ extern void bshell_command_set_args_reverse(
extern const fx_value *bshell_command_get_arg(
bshell_command *cmd,
size_t index);
extern size_t bshell_command_get_arg_count(const bshell_command *cmd);
extern enum bshell_status bshell_command_begin_processing(
bshell_command *command);
bshell_command *command,
enum bshell_command_position position);
extern enum bshell_status bshell_command_process_record(
bshell_command *command,
FX_TYPE_FWDREF(bshell_pipeline) * pipeline,
@@ -8,6 +8,8 @@ FX_DECLS_BEGIN;
struct bshell_runtime;
enum bshell_command_position;
#define BSHELL_TYPE_CMDCALL (bshell_cmdcall_get_type())
FX_DECLARE_TYPE(bshell_cmdcall);
@@ -29,7 +31,8 @@ extern enum bshell_status bshell_cmdcall_resolve(
extern enum bshell_status bshell_cmdcall_process_record(
bshell_cmdcall *cmdcall,
FX_TYPE_FWDREF(bshell_pipeline) * pipeline,
struct bshell_runtime *rt);
struct bshell_runtime *rt,
enum bshell_command_position position);
FX_DECLS_END;