MiniDevil
As beautiful as a shell
Tilde expansion: converts ~ to $HOME in unquoted words. More...
Include dependency graph for tilde_expand.c:Tilde expansion: converts ~ to $HOME in unquoted words.
Definition in file tilde_expand.c.
Functions | |
| static char * | expand_tilde (char *str, t_env *env_list, t_quote_type quote_type) |
| Expand leading ~ to $HOME. More... | |
| char * | expand_full (char *str, t_env *env, t_quote_type qt, int exit_status) |
| Handles variable expansion and tilde expansion. More... | |
|
static |
Expand leading ~ to $HOME.
Handles ~ ($HOME) and ~/path ($HOME/path)
| str | Input string |
| env_list | Environment list (for HOME lookup) |
| quote_type | Quote context |
Definition at line 27 of file tilde_expand.c.
References get_env_value(), and QUOTE_NONE.
Referenced by expand_full().
Here is the call graph for this function:
Here is the caller graph for this function:| char* expand_full | ( | char * | str, |
| t_env * | env, | ||
| t_quote_type | qt, | ||
| int | exit_status | ||
| ) |
Handles variable expansion and tilde expansion.
Tilde expansions run first to conform with BASH and correctly handling:
export TEST="~"echo $TEST| str | Input string |
| env | Environment list |
| qt | Quote type |
| exit_status | Exit status for $? |
Definition at line 60 of file tilde_expand.c.
References expand_tilde(), and expand_variables().
Referenced by expand_all_tokens().
Here is the call graph for this function:
Here is the caller graph for this function: