Files
bshell/bshell.core/aliases/echo.c
T
wash edfb3e24a3 bshell: re-organise build into three separate components
bshell: the front-end binary
bshell.runtime: contains the parser, compiler, and classes needed to run bshell scripts
bshell.core: contains the builtin commandlets and aliases
2026-05-25 10:33:29 +01:00

45 lines
1.3 KiB
C

#include <bshell/command/alias.h>
#include <bshell/command/command.h>
#include <fx/reflection/function.h>
#include <fx/string.h>
#include <fx/vector.h>
#define BSHELL_TYPE_ECHO (bshell_echo_get_type())
fx_type_id bshell_echo_get_type(void);
FX_DECLARE_TYPE(bshell_echo);
FX_TYPE_CLASS_DECLARATION_BEGIN(bshell_echo)
FX_TYPE_CLASS_DECLARATION_END(bshell_echo)
struct bshell_echo_p {
};
static void init(fx_object *obj, void *priv)
{
}
FX_TYPE_CLASS_BEGIN(bshell_echo)
FX_TYPE_VTABLE_INTERFACE_BEGIN(fx_object, FX_TYPE_OBJECT)
FX_INTERFACE_ENTRY(to_string) = NULL;
FX_TYPE_VTABLE_INTERFACE_END(fx_object, FX_TYPE_OBJECT)
FX_TYPE_VTABLE_INTERFACE_BEGIN(bshell_alias, BSHELL_TYPE_ALIAS)
FX_INTERFACE_ENTRY(a_callable_name) = "echo";
FX_INTERFACE_ENTRY(a_target_name) = "Write-Output";
FX_TYPE_VTABLE_INTERFACE_END(bshell_cmdlet, BSHELL_TYPE_CMDLET)
FX_TYPE_VTABLE_INTERFACE_BEGIN(bshell_command, BSHELL_TYPE_COMMAND)
FX_TYPE_VTABLE_INTERFACE_END(bshell_command, BSHELL_TYPE_COMMAND)
FX_TYPE_CLASS_END(bshell_echo)
FX_TYPE_DEFINITION_BEGIN(bshell_echo)
FX_TYPE_ID(0xedd507bf, 0x2e32, 0x425b, 0x9c73, 0x2ba9539eace0);
FX_TYPE_NAME("bshell.core.echo");
FX_TYPE_EXTENDS(BSHELL_TYPE_ALIAS);
FX_TYPE_CLASS(bshell_echo_class);
FX_TYPE_INSTANCE_INIT(init);
FX_TYPE_INSTANCE_PRIVATE(struct bshell_echo_p);
FX_TYPE_DEFINITION_END(bshell_echo)