Livl Shell  0.1
Livl Shell is an intermediate reimplementation of the bash shell in C language.
Functions
command.h File Reference

File containing the command functions to manage the commands entered by the user (parsing, evaluation, etc.). More...

#include "typedef.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "utils.h"
#include "alias.h"
Include dependency graph for command.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

Command evaluate_command (const char *input)
 Evaluate a command from a string. More...
 
void free_command (Command *cmd)
 Free a command. More...
 
void get_complete_command_array (Command *cmd)
 Get the complete command (command + arguments) as a string. More...
 
void init_command (Command *cmd)
 Initialize a command. More...
 

Detailed Description

File containing the command functions to manage the commands entered by the user (parsing, evaluation, etc.).

Author
Julien & Franck
Date
24 Dec 2023

Function Documentation

◆ evaluate_command()

Command evaluate_command ( const char *  input)

Evaluate a command from a string.

Parameters
inputthe string to evaluate
Returns
the command structure

◆ free_command()

void free_command ( Command cmd)

Free a command.

Parameters
cmdthe command to free

◆ get_complete_command_array()

void get_complete_command_array ( Command cmd)

Get the complete command (command + arguments) as a string.

It is useful for execvp(const char* command, char* argv[])

Parameters
cmdthe command to get

◆ init_command()

void init_command ( Command cmd)

Initialize a command.

Parameters
cmdthe command to initialize