Shell: Add append operator (>>)

Fixes #93.
This commit is contained in:
Robin Burchell 2019-05-26 00:38:11 +02:00 committed by Andreas Kling
parent c6e79bd53a
commit aee99b05a6
Notes: sideshowbarker 2024-07-19 13:56:58 +09:00
3 changed files with 72 additions and 37 deletions

View file

@ -4,7 +4,7 @@
#include <AK/Vector.h>
struct Redirection {
enum Type { Pipe, FileWrite, FileRead, Rewire };
enum Type { Pipe, FileWrite, FileWriteAppend, FileRead, Rewire };
Type type;
int fd { -1 };
int rewire_fd { -1 };
@ -33,6 +33,7 @@ private:
Free,
InSingleQuotes,
InDoubleQuotes,
InWriteAppendOrRedirectionPath,
InRedirectionPath,
};
State m_state { Free };