Age | Commit message (Collapse) | Author | |
---|---|---|---|
2020-08-25 | Misc: Remove some unneeded includes of Timer.h and ElapsedTimer.h (#3286) | Nico Weber | |
2020-08-22 | Shell: Add tests for 'if' | AnotherTest | |
2020-08-22 | Shell: Add 'if' expressions | AnotherTest | |
```sh if foo bar baz { quux } else if foobar || whatever { echo I ran out of example words } else { exit 2 } ``` | |||
2020-08-22 | Shell: Actually process for loop entries as a stream | AnotherTest | |
This actually does what d4bcc68 meant to do. | |||
2020-08-22 | Shell: Do not flatten syntactic lists in for_each_entry() | AnotherTest | |
2020-08-22 | Shell: Mark AST::Background as would_execute if its subnode does | AnotherTest | |
2020-08-21 | LibLine: Handle interrupts/window size changes internally | AnotherTest | |
2020-08-21 | LibLine: Handle Ctrl-C and Ctrl-D in a way similar to other line editors | AnotherTest | |
Makes C-c print "^C" and continue prompting on a new line. Also fixes a problem where an interrupted get_line() would need more read()'s than required to update the display. | |||
2020-08-21 | Shell: Make 'for' loops read their input as an stream | AnotherTest | |
i.e. process an element as it becomes available. | |||
2020-08-19 | Shell: Do not attempt to yank the TTY from background processes | AnotherTest | |
They don't own the TTY anyway! | |||
2020-08-19 | Shell: Name the pipe ends correctly | AnotherTest | |
2020-08-19 | Shell: Fix outdated debug log code | AnotherTest | |
2020-08-18 | Shell: Respect the 'PROMPT_EOL_MARK' environment variable | AnotherTest | |
This allows the users to customise what is shown when a command ends without a newline. | |||
2020-08-18 | LibLine: Read configuration from a config file | AnotherTest | |
2020-08-17 | Shell: Ensure that the cursor starts on a new line | AnotherTest | |
And print an indicator when it doesn't, a la zsh. | |||
2020-08-15 | Shell: Add some tests for builtin redirection | AnotherTest | |
2020-08-15 | Shell: Allow redirections and pipes on builtins | AnotherTest | |
Fixes #3072. | |||
2020-08-14 | Shell: Restore input offset when failing to parse a redirection | AnotherTest | |
This fixes #3051 | |||
2020-08-14 | Shell: Start writing a man page | AnotherTest | |
This patch adds two man pages describing the parts of the shell that have been so far finalised. | |||
2020-08-13 | Shell: Add test for 37d5e3e0df6 / #3073 | Nico Weber | |
2020-08-12 | Shell: Add create() factory function for PathRedirection | Andreas Kling | |
2020-08-12 | Shell: Fix another FdRedirection reference leak | Andreas Kling | |
Add a create() factory function to prevent this from happening again. | |||
2020-08-12 | Shell: Wait for the parent to deal with the PGID stuff before execvp() | AnotherTest | |
2020-08-12 | Shell: Do not assume that the job has exited after unblock in fg | AnotherTest | |
2020-08-12 | Shell: Eliminate possible use-after-free in builtin_fg() | AnotherTest | |
This fixes a possible UAF where the job might be destroyed in block_on_job(). | |||
2020-08-12 | Shell: Eliminate reference leak in AST::Execute::run() | AnotherTest | |
2020-08-12 | Shell: Moves pipelined processes to one process group | AnotherTest | |
2020-08-12 | Shell: Show the job id instead of the pid when a job exits in background | AnotherTest | |
2020-08-10 | Shell: Fix fd leak with pipes | Nico Weber | |
Fixes the problem reported in #3073. While trying to write a test for this, I thought I'd use Shell -c 'for i in $(seq 100) { echo $i }' | head -n 1 but that makes the cpu spin at 100% and doesn't terminate even with this fix here. But at least piping disasm into head now works. | |||
2020-08-10 | Shell: Cancel a running for loop upon receiving any non-SIGINT signal | AnotherTest | |
And keep the old behaviour of needing two interruptions on SIGINT. | |||
2020-08-09 | Shell: Make redirections without commands apply to all future commands | AnotherTest | |
This restirects redirection-only commands' scope, and keeps their usefulness too! | |||
2020-08-09 | Shell: Stop a for loop upon receiving two consecutive interruptions | AnotherTest | |
This does not work perfectly (just like every other shell...), if the running program handles the signal (SIGINT in this case) and quits cleanly, the shell cannot detect the interruption. This is the case with our `sleep(1)`. | |||
2020-08-07 | Shell: Make Command::redirections a NonnullRefPtrVector | Andreas Kling | |
2020-08-07 | Shell: Make VariableDeclarations::Variable store NonnullRefPtrs | Andreas Kling | |
2020-08-07 | Shell: Make resolve_without_cast() return NonnullRefPtr<Value> | Andreas Kling | |
2020-08-07 | Shell: Store ListValue's values in a NonnullRefPtrVector<Value> | Andreas Kling | |
A ListValue never stores null Values, so it makes sense to restrict it. This also propagates use of NonnullRefPtr to the create() helpers. There's a small bit of awkwardness around the use of initializer_list, since we cannot directly construct a NonnullRefPtrVector from one. | |||
2020-08-07 | Shell: Add some obvious move() calls in AST constructors | Andreas Kling | |
2020-08-06 | LibLine+Shell: Remove unused split_mechanism | Nico Weber | |
It was only read in should_break_token(), which had no callers. should_break_token() also got `foo\\ bar` and `"foo bar"` wrong. | |||
2020-08-06 | Shell: Make "fg" set the TTY PGID before SIGCONT'ing the job | Andreas Kling | |
Otherwise the child will get SIGTTIN/SIGTTOU on next TTY I/O. | |||
2020-08-06 | Shell: Print job status after suspending a command | Andreas Kling | |
2020-08-06 | Shell: Move printing job status into a Job::print_status() helper | Andreas Kling | |
This is only used by the "jobs" builtin right now, but more soon. | |||
2020-08-06 | Shell: Remove unnecessary ignore() in Shell::custom_event() | Andreas Kling | |
Ignoring an event means that it will bubble to the parent Core::Object. This is not necessary here. | |||
2020-08-06 | Shell: Store jobs as NonnullRefPtr<Job> | Andreas Kling | |
2020-08-06 | Shell: Make Job constructors private and use a create() helper | Andreas Kling | |
Also store PGIDs as pid_t since that's what they are. | |||
2020-08-06 | Shell: Make run_command() return a NonnullRefPtrVector<Job> | Andreas Kling | |
This never returns null Job pointers. | |||
2020-08-06 | Shell: Mark suspended children as such when receiving a SIGCHLD | AnotherTest | |
2020-08-05 | Shell: Do not assume that stdin/stdout is a TTY | AnotherTest | |
This closes #2989. | |||
2020-08-04 | Shell: Give the TTY to the foreground process | AnotherTest | |
This fixes the bug with the shell not waiting for any foreground process that attempts to read from the terminal in the Lagom build. | |||
2020-08-04 | Shell: Use NonnullRefPtr to simplify some things in the parser/AST | Andreas Kling | |
2020-08-04 | Shell: Correct FdRedirection inheriting from two RefCounted bases | AnotherTest | |
Also add missing calls to `adopt()`. |