terminado
This commit is contained in:
@@ -53,28 +53,6 @@ int executor_heredoc_open_tmp(char **path_out)
|
||||
return (-1);
|
||||
}
|
||||
|
||||
char *executor_heredoc_read_line(t_minishell *minishell)
|
||||
{
|
||||
char *prompt;
|
||||
char *line;
|
||||
size_t len;
|
||||
|
||||
if (!isatty(STDIN_FILENO))
|
||||
{
|
||||
line = get_next_line(STDIN_FILENO);
|
||||
if (line == NULL)
|
||||
return (NULL);
|
||||
len = ft_strlen(line);
|
||||
if (len > 0 && line[len - 1] == '\n')
|
||||
line[len - 1] = '\0';
|
||||
return (line);
|
||||
}
|
||||
prompt = get_var("PS2", minishell);
|
||||
if (prompt == NULL)
|
||||
prompt = DEFAULT_PS2;
|
||||
return (readline(prompt));
|
||||
}
|
||||
|
||||
void executor_heredoc_discard_tmp(int fd, char *path)
|
||||
{
|
||||
if (fd >= 0)
|
||||
|
||||
Reference in New Issue
Block a user