Age | Commit message (Collapse) | Author |
|
It was only read in should_break_token(), which had no callers.
should_break_token() also got `foo\\ bar` and `"foo bar"` wrong.
|
|
Otherwise the child will get SIGTTIN/SIGTTOU on next TTY I/O.
|
|
|
|
This is only used by the "jobs" builtin right now, but more soon.
|
|
Ignoring an event means that it will bubble to the parent Core::Object.
This is not necessary here.
|
|
|
|
Also store PGIDs as pid_t since that's what they are.
|
|
This never returns null Job pointers.
|
|
|
|
This closes #2989.
|
|
This fixes the bug with the shell not waiting for any foreground process
that attempts to read from the terminal in the Lagom build.
|
|
|
|
Also add missing calls to `adopt()`.
|
|
This patchset also adds the 'shift' builtin, as well as the usual tests.
closes #2948.
|
|
|
|
This has the nice side effect of fixing alias completion, because
cached_path is the source of truth for the completion system, and it was
only refreshed (with shell::cache_path()) in the shell's constructor,
before the rc files where loaded (ie no aliases)
This also means that shell::is_runnable can now rely on the cache, and
doesn't have to check the aliases itself.
|
|
And display in red the command which will result in something like "no
command, or is directory" (inspired by the fish shell).
|
|
|
|
|
|
|
|
According to the linux waitid manpage, the value of wstatus is
unspecified if wait() returns 0, so we should not assume that any
value it holds is correct (including the exit code).
This is only applicable to the Lagom build.
|
|
This makes things like `foo&; bar` behave as expected.
Such behaviour is actually closer to the grammar defined in Parser.h
anyway :P
|
|
|
|
For example, type 'Hello?' without the quotation marks but with the
question mark, and press TAB.
Previously, this would crash the Shell. Now, it merely refuses
to make any suggestions.
We could do better, but that is too hard for now.
|
|
This fixes #2825.
|
|
|
|
Closes #2760.
This commit adds a 'for' loop, and tweaks the syntax slightly to make &&
bind more tightly than || (allowing for `expr && if_ok || if_bad`) :^)
|
|
This allows `((1 2 3) (4 5 6))` to remain nested until we explicitly
flatten it out.
|
|
This makes the test utility work, when invoked as '['
|
|
|
|
This fixes the issue with C-z not suspending the job on the first try.
...and further signal issues when the suspended job is contiued.
|
|
This commit fixes job control by putting children in their own process
group, and proxying TTY signals to active jobs.
This also cleans up the code around builtin_disown a bit to use
the newer job interfaces.
|
|
|
|
This makes running commands from outside the AST chain easier.
|
|
|
|
The shell is wiring up signal handlers, and when they get torn
down by Core::EventLoop, they are reset, which requires sigaction.
|
|
Fixes #2717
|
|
Closes #2732
|
|
This fixes a crash when Shell tries to highlight `|`.
|
|
The global script runs before the local (per-user) one.
|
|
This allows the shell to be notified about SIGWINCH even when a child
process is running in the foreground.
|
|
Normally, this should not happen, as the child should stay around until
we do a waitid on it.
|
|
This allows the parser to finally parse the entire source into a single
AST.
As a result of allowing comments inside sequences, Sequence is also
marked as would_execute if its left or right node would.
|
|
|
|
This makes '------inl' a completion request for an option named
'----inl' instead of 'inl'.
|
|
|
|
Take one small step towards #2357.
Handle completing barewords starting with '-' by piping the requests to
the Shell::complete_option(program_name, option) :^)
Also implements completion for a single builtin (setopt) until we figure out how
to handle #2357.
|
|
This builtin sets (and unsets) boolean flags that alter the behaviour of
the shell.
The only flags added are
- inline_exec_keep_empty_segments: Keep empty segments in the result of
splitting $(...) by $IFS
- verbose: Announce each command before executing it
It should be noted that the (rather extreme) verbosity of the names is
intentional, and will hopefully be alleviated by the next commit :^)
|
|
The description contains an error message and where in the source the
error happened.
|
|
|