cmdlist refactor: use cmdlist instead of command_list as a shorthand

I hope this doesn't break too much code ^^
This commit is contained in:
Khaïs COLIN 2025-03-18 14:55:58 +01:00
parent 56fe943efc
commit 131ba36d93
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
18 changed files with 98 additions and 98 deletions

26
tests/parse_cmdlist.c Normal file
View file

@ -0,0 +1,26 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* parse_cmdlist.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/03/11 15:54:43 by khais #+# #+# */
/* Updated: 2025/03/18 15:05:39 by khais ### ########.fr */
/* */
/* ************************************************************************** */
#include "../src/parser/cmdlist/cmdlist.h"
#include "../src/parser/wordsplit/wordsplit.h"
#include "libft.h"
#include "unistd.h"
#include <assert.h>
t_cmdlist *parse_cmdlist(char *input)
{
ft_dprintf(STDERR_FILENO, "Now checking command list with input [%s]\n", input);
t_wordlist *words = minishell_wordsplit(input);
t_cmdlist *cmd = cmdlist_from_wordlist(words);
wordlist_destroy(words);
return (cmd);
}