commits
- Fixes to rdrs across compound commands
- Continue and Return support
- Globbing now uses Globlon
Initial support for the `read` built-in, no <backslash> escape handling
(TODO).
There has to be a better way of dealing with --key='value'
A really poor approximation for `local` variables. This is not POSIX.
Adds additional signal numbers that can be recognised by `trap`.
This adds the errexit option for the set built-in, although it does not
do an awful lot with it.
Additionally, this also allows Morbig to recognise empty assignments
like `FOO=`.
Still not happy with this implementation, but it is closer to the
specification in terms of field-splitting and handling of awkward
parameters like $@.
A simple history abstraction that now uses XDG for persisting the
history to a file and loading it during interactive mode.
A first pass implementation of the `trap` built-in. Also, some fixes for
handling the `exit` built-in in terms of what is and what is not a
subshell.
Previously we relied on spawning a long-running [sleep] process in order
to have a process to make the process group leader. The issue was that
Eio was eager to reap child processes but that meant we could not
attach a bunch of processes in a pipeline to the pid of the first
process without race conditions. Now we explicitly allow users to hold
off on reaping children until a promise is resolved.
The initial engine for handling arithmetic expressions. There are plenty
more operators to add, but those shouldn't be too hard. The real
challenge is to fix the shell parser for consuming the expressions, it
is currently broken w.r.t double left parens appearing inside the
expression itself, e.g. $(( ((1 + 1) * 4) )).
The command built-in should allow normal shell built-ins to just work.
Thanks to Ishaan Ghandi's work in
https://github.com/colis-anr/morbig/pull/120, we now have some limited
support for arithmetic expression handling in the shell. Nothing very
extravagant, but workable.
This adds initial functionality for the case compound command.
Switches our use of linenoise to bruit, a port of linenoise to OCaml.
This adds the upstream OCaml community support for reverse search.
Stock linenoise does not have mid-tab completion, we will need to find a
patch somewhere for that.
- Aliasing in Morbig was slightly broken and is now hackily fixed.
- Exporting of environment variables was slightly broken
- Subshell exit codes were not quite right either
It seems many a script uses the shorthand &> to redirect stdout and
stderr at the same time (usually to /dev/null).
This also fixes the problem where the stdout of built-in functions was
just going to the parent stdout instead of respecting things like
pipelines etc.
All of the attributes (remove smallest prefix, parameter length etc.).
Previously we relied on spawning a long-running [sleep] process in order
to have a process to make the process group leader. The issue was that
Eio was eager to reap child processes but that meant we could not
attach a bunch of processes in a pipeline to the pid of the first
process without race conditions. Now we explicitly allow users to hold
off on reaping children until a promise is resolved.
The initial engine for handling arithmetic expressions. There are plenty
more operators to add, but those shouldn't be too hard. The real
challenge is to fix the shell parser for consuming the expressions, it
is currently broken w.r.t double left parens appearing inside the
expression itself, e.g. $(( ((1 + 1) * 4) )).