summaryrefslogtreecommitdiff
path: root/Shell/Parser.cpp
AgeCommit message (Collapse)Author
2020-01-25Shell: Allow empty tokens if enclosed in single or double quotesAndreas Kling
Previously the shell parser would discard empty tokens. We now allow them when they are enclosed in quotes (either '' or "") This means that a command like _echo ""_ will actually pass an empty string to /bin/echo in argv[1] now.
2020-01-18Meta: Add license header to source filesAndreas Kling
As suggested by Joshua, this commit adds the 2-clause BSD license as a comment block to the top of every source file. For the first pass, I've just added myself for simplicity. I encourage everyone to add themselves as copyright holders of any file they've added or modified in some significant way. If I've added myself in error somewhere, feel free to replace it with the appropriate copyright holder instead. Going forward, all new source files should include a license header.
2019-12-09AK: Use size_t for the length of stringsAndreas Kling
Using int was a mistake. This patch changes String, StringImpl, StringView and StringBuilder to use size_t instead of int for lengths. Obviously a lot of code needs to change as a result of this.
2019-12-05Shell: Redirectiong from multiple-digit fdsKarol Baraniecki
2019-12-05Shell: Implement specifying fds in file redirectionKarol Baraniecki
2019-09-14Shell: Add POSIX-compliant character escapingAaron Malpas
POSIX.1-2017, Shells & Utilities, section 2.2
2019-09-01Shell: Support semicolons for separating commandsConrad Pankoff
2019-06-07Shell: Run clang-format on everything.Andreas Kling
2019-06-04Shell: Separate fd rewirings from redirections.Andreas Kling
This was unnecessarily confusing. When we build up a chain of commands connected by pipes, we now store the file descriptors of each end of these pipes as rewirings in a vector. The rewirings are then put into effect by calls to dup2().
2019-05-26Shell: Add append operator (>>)Robin Burchell
Fixes #93.
2019-05-07Shell: Move the Shell to a separate directory and let's call it "Shell" :^)Andreas Kling