Minishell
Loading...
Searching...
No Matches
history.c File Reference
#include "../../include/main.h"
#include "../../include/custom_commands.h"
#include <sys/stat.h>
#include "../../include/utils.h"
Include dependency graph for history.c:

Functions

char * get_path (data_t *data, history_t *history)
 
void add_history (data_t *data)
 
char * read_history_utils (history_t *history, char *path)
 
void print_with_number (data_t *data, int times, char *path)
 
void print_history (data_t *data, run_command_t *cmd)
 

Function Documentation

◆ add_history()

void add_history ( data_t * data)

add the command to the history file

Parameters
data
Here is the call graph for this function:

◆ get_path()

char * get_path ( data_t * data,
history_t * history )

get the path of the history file

Parameters
data
history
Here is the call graph for this function:

◆ print_history()

void print_history ( data_t * data,
run_command_t * cmd )

main funcion to print the history file

Parameters
data
cmd
Here is the call graph for this function:

◆ print_with_number()

void print_with_number ( data_t * data,
int times,
char * path )

print the history file with a especified number

Parameters
timesnumber of times especified by the user to print the history
pathpath of the history file in yout pc
data
Here is the call graph for this function:

◆ read_history_utils()

char * read_history_utils ( history_t * history,
char * path )

get all the information of the history file into a string

Parameters
history
path