minishell
Minishell Project for École 42
|
Interpolation of variables and handling of quotes. More...
#include "minishell.h"
Functions | |
char * | interpolate (t_shell *shell, char *str) |
Interpolates variables and handles quotes within a shell command. | |
Interpolation of variables and handling of quotes.
This file contains functions related to variable interpolation and the handling of quoted strings. Variable interpolation involves replacing variable references (e.g., $VAR) with their corresponding values from the environment list. Quotes can be single (' ') or double (" ") and may contain variable expansions.
char * interpolate | ( | t_shell * | shell, |
char * | str | ||
) |
Interpolates variables and handles quotes within a shell command.
This function processes variable interpolation and handles quotes (single or double) within the shell prompt. It iterates through the prompt string, expanding variables and preserving quoted strings.
[in] | shell | A pointer to the shell struct. |
[in,out] | str | A pointer to the command string to be processed. |
[in] | inter | A pointer to the expander struct. |