fix(execution): reimplemented the builtins

This commit is contained in:
Jean HERAIL 2026-01-27 21:10:24 +01:00
parent 8a5c589742
commit a8b4e5d6df
3 changed files with 91 additions and 28 deletions

View file

@ -14,32 +14,7 @@
#include "../utils/ast/ast.h"
#include "../utils/hash_map/hash_map.h"
// --- Helpers ---
/**
* @brief converts a linked list of command arguments to an argv array. Don't
* forget to free the result
*
* @param command_list Linked list of command arguments
* @return char** Array of command arguments suitable for execvp. Terminated by
* NULL
*/
/**
* @brief Tries to execute a builtin command if the command matches a builtin
*
* @param argv Array of command arguments
* @return int Exit status of the builtin command, or -1 if not a builtin
*/
// --- Execution Core ---
/**
* @brief Executes a command represented by an ast_command structure
*
* @param command The command to execute
* @return int The exit status of the command
*/
// Refactored: delegates to helpers in execution_helpers.c
#include "execution_helpers.h"