minishell
minishell copied to clipboard
[REFACTOR] Split up `exec_pipeline()` for readability
The function was very dense and we resorted to bad practices like the comma operator to keep the function length within 25 lines for Norminette.
- Split up long
elseblock ofexec_pipeline()into separateexec_cmd_table()function and rename the original function toiter_pipeline(). - Change unnecessary long
while (check cmd_table_type)loop check towhile (true)+if (check cmd_table_type)+break. - Remove comma operator.