30#ifndef HOME_CORE_SHELL_H
31#define HOME_CORE_SHELL_H
33#if defined(__cplusplus)
136#if defined(__cplusplus)
void shell_run(void)
Run the interactive shell.
int shell_read_line(char *buffer, size_t max_length)
Read and echo one console line.
int shell_execute_line(shell_context_t *context, char *line)
Tokenize and run one command line in a session.
int(* shell_command_handler_t)(shell_context_t *context, int argc, char **argv)
Command handler.
Definition shell.h:68
void shell_register_command(const char *name, const char *help, shell_command_handler_t handler)
Add a command.
void shell_init(void)
Register the built-in commands.
session_t shell_context_t
Command execution context: the session the command runs in.
Definition shell.h:53
Sessions: a user identity, working directory, and last command status.
Execution state of one shell session.
Definition session.h:26