mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
postprocessing: do quote removal
This commit is contained in:
parent
22b0b4746f
commit
f07a80c762
5 changed files with 141 additions and 3 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: kcolin <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/02/06 13:44:06 by kcolin #+# #+# */
|
||||
/* Updated: 2025/03/19 16:38:42 by khais ### ########.fr */
|
||||
/* Updated: 2025/03/20 17:36:58 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -16,6 +16,7 @@
|
|||
#include "parser/wordlist/wordlist.h"
|
||||
#include "parser/wordsplit/wordsplit.h"
|
||||
#include "postprocess/redirections/redirection_parsing.h"
|
||||
#include "parser/remove_quotes/remove_quotes.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
/*
|
||||
|
|
@ -53,11 +54,14 @@ static void debug_command(t_cmdgroup *cmd)
|
|||
**
|
||||
** Currently, this is the following:
|
||||
** 1. redirection parsing
|
||||
** 2. quote removal
|
||||
*/
|
||||
static t_cmdgroup *post_process_command(t_cmdgroup *cmd)
|
||||
{
|
||||
if (cmdgroup_parse_redirections(cmd) == NULL)
|
||||
return (cmdgroup_destroy(cmd), NULL);
|
||||
if (cmdgroup_remove_quotes(cmd) == NULL)
|
||||
return (cmdgroup_destroy(cmd), NULL);
|
||||
return (cmd);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue