MiniDevil
As beautiful as a shell
Implements export: sets and displays env variables.
More...
Include dependency graph for builtin_export.c:Implements export: sets and displays env variables.
Definition in file builtin_export.c.
Functions | |
| static int | is_valid_identifier (char *str) |
| Validate an export identifier (KEY or KEY= or KEY+=) More... | |
| static void | print_export_error (char *arg) |
| Print export error. More... | |
| static int | export_one (char *arg, t_env **env) |
| Process an export argument. More... | |
| int | builtin_export (char **args, t_env **env) |
Implement the export command. More... | |
|
static |
Validate an export identifier (KEY or KEY= or KEY+=)
_, followed by alnum or _+ is allowed only immediately right before =| str | String to validate |
Definition at line 26 of file builtin_export.c.
Referenced by export_one().
Here is the caller graph for this function:
|
static |
Print export error.
| arg | The invalid argument string |
Definition at line 56 of file builtin_export.c.
Referenced by export_one().
Here is the caller graph for this function:
|
static |
Process an export argument.
| arg | Argument string (KEY=value, KEY+=value or KEY) |
| env | Pointer to env list head |
Definition at line 70 of file builtin_export.c.
References export_append(), export_assign(), export_no_value(), is_valid_identifier(), and print_export_error().
Referenced by builtin_export().
Here is the call graph for this function:
Here is the caller graph for this function:| int builtin_export | ( | char ** | args, |
| t_env ** | env | ||
| ) |
Implement the export command.
| args | NULL terminated arg array with arg[0] = "export" |
| env | Pointer to env list head (modified on export) |
Definition at line 99 of file builtin_export.c.
References export_one(), and print_sorted_export().
Referenced by exec_builtin().
Here is the call graph for this function:
Here is the caller graph for this function: