Age | Commit message (Collapse) | Author |
|
This really just works around the core issue, which is that we have no
reliable way to know exactly who raised the signal (yet).
Fixes #3645, in a very weird (yet apparently standard) way.
|
|
|
|
This patchset makes it possible for the shell to format the current
buffer of the line editor live, with somewhat accurate cursor tracking.
Since this feature is pretty goofy at best, let's keep it off by default
for now :^)
|
|
|
|
Instead of everyone overriding save_to() and set_property() and doing
a pretty asymmetric job of implementing the various properties, let's
add a bit of structure here.
Object properties are now represented by a Core::Property. Properties
are registered with a getter and setter (optional) in constructors.
I've added some convenience macros for creating and registering
properties, but this does still feel a bit bulky. We'll have to
iterate on this and see where it goes.
|
|
This implementation does not have support for 'return' yet.
|
|
|
|
|
|
This patchset makes the shell capable of lazily resolving and executing
sequences of commands, to allow for putting logical sequences in the
background.
In particular, it enables And/Or/Sequence nodes to be run in the background,
and consequently unmarks them as `would_execute`.
Doing so also fixes job control to an extent, as jobs are now capable of
having 'tails', so sequences can be put in the background while
preserving their following sequences.
|
|
And print an indicator when it doesn't, a la zsh.
|
|
Fixes #3072.
|
|
This restirects redirection-only commands' scope, and keeps their
usefulness too!
|
|
|
|
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.
|
|
This patchset also adds the 'shift' builtin, as well as the usual tests.
closes #2948.
|
|
|
|
And display in red the command which will result in something like "no
command, or is directory" (inspired by the fish shell).
|
|
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 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.
|
|
Fixes #2717
|
|
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.
|
|
|
|
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 :^)
|
|
This commit also removes the ExecutionInputType and directly uses
RefPtr<Shell> instead, since nothing else is needed for execution
purposes, and also makes the shell refuse to evaluate commands with
any sort of syntax error.
|
|
This behaviour is overridable with the `--skip-init' flag.
The default file is at '~/shell-init.sh'
|
|
This follows the other shells in alias resolution, and resolves the
alias only once.
|
|
This commit also completely reworks the execution, highlighting and
completion model to work with the new AST.
New additions:
- $(...) stdout captures
- fd>&fd redirections
- fd>&- redirections (close fd)
- read-write redirections (<> path)
- completely event-based execution
- the weird idea of allowing the user to redirect the shell's own fds
- variables in strings
- local variables
- minimal list support
- adding hyperlinks to all paths that exist
|
|
Since the last job need not have an ID of size()-1, we need to find the
max job id and give that+1 out
|
|
|
|
|
|
This fixes a bunch of FIXME's in LibLine.
Also handles the case where read() would read zero bytes in vt_dsr() and
effectively block forever by erroring out.
Fixes #2370
|
|
And make sure that the user means to exit and kill current jobs before exiting.
|
|
|
|
|
|
LibLine should ultimately not care about what a "token" means in the
context of its user, so force the user to split the buffer itself.
This also allows the users to pick up contextual clues as well, since
they have to lex the line themselves.
This commit pacthes Shell and the JS repl to better handle completions,
so certain wrong behaviours are now corrected as well:
- JS repl can now complete "Object . getOw<tab>"
- Shell can now complete "echo | ca<tab>" and paths inside strings
|
|
|
|
This commit refactors Shell to a Core::Object and switches its looping
to Core::EventLoop.
|