feat: implemented pipes and redirects + background operator

This commit is contained in:
2024-03-16 23:07:19 +01:00
parent 6b9bedac3c
commit 7e6c1147db
10 changed files with 246 additions and 74 deletions

View File

@@ -7,7 +7,17 @@
#include "scanner.h"
//TODO: handle EOF more completely (currently only EOF at the start of the line is handled)
#if EXT_PROMPT
#include <readline/readline.h>
/**
* Reads an inputline from stdin.
* @return a string containing the inputline.
*/
char *readInputLine(char const *prompt) {
return readline(prompt);
}
#else
/**
* Reads an inputline from stdin.
* @return a string containing the inputline.
@@ -43,6 +53,7 @@ char *readInputLine() {
s[i] = '\0';
return s;
}
#endif
/**
* The function isOperatorCharacter checks whether the input paramater \param c is an operator.