Go to the source code of this file.
|
void | init_history (history_t *history) |
|
void | add_history (data_t *data) |
|
int | command_is_digit (const char *str) |
|
char * | read_history_utils (history_t *history, char *path) |
|
char * | get_path (data_t *data, history_t *history) |
|
void | up_down_command (data_t *data, bool up_direction, int *his_idx) |
|
int | my_cd (data_t *data, run_command_t *command) |
|
int | print_env (data_t *data) |
|
void | add_env (data_t *data, char *name, char *value) |
|
int | my_setenv (data_t *data, run_command_t *command) |
|
int | my_unsetenv (data_t *data, run_command_t *command) |
|
int | select_command (data_t *data, run_command_t *command) |
|
env_node_t * | find_env (data_t *data, char *name) |
|
alias_t * | create_alias_node (const char *name, char **value) |
|
◆ add_env()
void add_env |
( |
data_t * | data, |
|
|
char * | name, |
|
|
char * | value ) |
◆ add_history()
void add_history |
( |
data_t * | data | ) |
|
add the command to the history file
- Parameters
-
◆ command_is_digit()
int command_is_digit |
( |
const char * | str | ) |
|
◆ create_alias_node()
alias_t * create_alias_node |
( |
const char * | name, |
|
|
char ** | value ) |
◆ find_env()
◆ get_path()
get the path of the history file
- Parameters
-
◆ init_history()
◆ my_cd()
◆ my_setenv()
◆ my_unsetenv()
◆ print_env()
int print_env |
( |
data_t * | data | ) |
|
◆ read_history_utils()
char * read_history_utils |
( |
history_t * | history, |
|
|
char * | path ) |
get all the information of the history file into a string
- Parameters
-
◆ select_command()
- Parameters
-
data | Global data structure |
command | item on the linked list that contains the current command |
- Returns
- 84 if there was an error, 0 if everything is ok and 1 if not found
◆ up_down_command()
void up_down_command |
( |
data_t * | data, |
|
|
bool | up_direction, |
|
|
int * | his_idx ) |
Move cursor up or down by using arrow keys
- Parameters
-
data | |
up_direction | bool false if up/ true if down |
his_idx | index of the history |