Minishell
|
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
#include "../include/main.h"
#include "../include/utils.h"
#include "../include/fill_command.h"
#include "../include/fill_data.h"
#include "../include/run_command.h"
#include "../include/builtins.h"
#include "../include/read_input.h"
Functions | |
int | run_command (data_t *data, run_command_t *com) |
int | decide_wich_command (data_t *data, char *input, run_command_t *comm) |
void | ask_command (data_t *data) |
int | start_program (char **env) |
Variables | |
char | command [PATH_MAX] |
void ask_command | ( | data_t * | data | ) |
This will read the user input using getline or read with non-cannonical mode depending if the user is using a terminal or not
data | Global data structure |
int decide_wich_command | ( | data_t * | data, |
char * | input, | ||
run_command_t * | comm ) |
data | Global data structure |
input | the text that the user wrote |
comm | The current command to execute |
int run_command | ( | data_t * | data, |
run_command_t * | com ) |
int start_program | ( | char ** | env | ) |
char command[PATH_MAX] |