mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
here_doc: prepare handling for variable expansion in here_doc
This is waiting on #23 to be merged to work
This commit is contained in:
parent
47f449d804
commit
d30a39d907
2 changed files with 5 additions and 2 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/03/07 11:42:29 by khais #+# #+# */
|
/* Created: 2025/03/07 11:42:29 by khais #+# #+# */
|
||||||
/* Updated: 2025/03/11 13:42:05 by khais ### ########.fr */
|
/* Updated: 2025/03/11 13:45:09 by khais ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -109,6 +109,8 @@ int here_doc(t_worddesc *marker, int infd)
|
||||||
{
|
{
|
||||||
if (is_marker(line, marker))
|
if (is_marker(line, marker))
|
||||||
return (finalize(outfd, filename));
|
return (finalize(outfd, filename));
|
||||||
|
if (!(marker->flags & (W_QUOTED | W_DQUOTE)))
|
||||||
|
ft_dprintf(STDERR_FILENO, "TODO: handle expansion\n");
|
||||||
line = output_line_and_next(infd, outfd, line);
|
line = output_line_and_next(infd, outfd, line);
|
||||||
}
|
}
|
||||||
ft_dprintf(STDERR_FILENO, "minishell: warning: here-document delimited by \
|
ft_dprintf(STDERR_FILENO, "minishell: warning: here-document delimited by \
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2025/03/07 11:43:32 by khais #+# #+# */
|
/* Created: 2025/03/07 11:43:32 by khais #+# #+# */
|
||||||
/* Updated: 2025/03/11 13:37:00 by khais ### ########.fr */
|
/* Updated: 2025/03/11 13:45:45 by khais ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -110,5 +110,6 @@ int main(void) {
|
||||||
test_here_doc_only_end_marker();
|
test_here_doc_only_end_marker();
|
||||||
test_here_doc_input_plus_end_marker();
|
test_here_doc_input_plus_end_marker();
|
||||||
test_here_doc_input_no_end_marker();
|
test_here_doc_input_no_end_marker();
|
||||||
|
// TODO: expansion handling
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue