-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unseparted when a expand var start with a with space
- Loading branch information
1 parent
bbdd27d
commit db7b2cc
Showing
1 changed file
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
/* By: bwisniew <[email protected]> +#+ +:+ +#+ */ | ||
/* +#+#+#+#+#+ +#+ */ | ||
/* Created: 2024/04/02 16:17:47 by bwisniew #+# #+# */ | ||
/* Updated: 2024/04/03 18:26:17 by bwisniew ### ########.fr */ | ||
/* Updated: 2024/04/10 22:36:46 by bwisniew ### ########.fr */ | ||
/* */ | ||
/* ************************************************************************** */ | ||
|
||
|
@@ -66,8 +66,10 @@ size_t expander_split(t_mshell *sh, size_t token_i) | |
size_t i; | ||
char **split; | ||
|
||
token = &((t_token *)(sh->tokens.tab))[token_i]; | ||
token = &((t_token *)sh->tokens.tab)[token_i]; | ||
replace_white_space(token->txt); | ||
if (token->txt && ft_isspace(token->txt[0]) && token_i > 0) | ||
((t_token *)sh->tokens.tab)[token_i - 1].is_separated = true; | ||
split = ft_split(token->txt, ' '); | ||
if (!split) | ||
return (-1); | ||
|