~emersion/mrsh

parser: add IO redirects to function definitions

References: https://github.com/emersion/mrsh/issues/30
builtin/set: fix monitor option enabled when running script
builtin/set: toggle job control at runtime

Closes: https://github.com/emersion/mrsh/issues/113
shell/job: ignore signals before grabbing control

setpgid might send SIGTTOU to the process, e.g. under strace. We need
to ignore this signal before calling setpgid.
shell/arithm: fix another crash on division by zero

When using /= or %= this time.
shell/arithm: fix crash on division by zero

Print an error instead.
shell/job: silence job_set_foreground warning

When job control has been turned off because of entering into a child
process, don't print a warning when calling job_set_foreground.
shell/trap: don't mark job control traps as set

trap(1) was previously printing job control traps as ignored. Hide this
from the user.
shell/trap: reset traps in subshells

> When a subshell is entered, traps that are not being ignored shall be set to
> the default actions, except in the case of a command substitution containing
> only a single trap command, when the traps need not be altered.

References: https://github.com/emersion/mrsh/issues/137
shell/trap: fix interaction between job control and trap(1)

References: https://github.com/emersion/mrsh/issues/137
shell/trap: disallow setting trap when ignored on entry

> Signals that were ignored on entry to a non-interactive shell cannot be
> trapped or reset
shell/trap: save and restore $?

References: https://github.com/emersion/mrsh/issues/137
builtin/trap: proper escaping when printing traps

References: https://github.com/emersion/mrsh/issues/137
builtin: add exec implementation
builtin/trap: add support for XSI numeric signal names
builtin/trap: fix FreeBSD build

SIGVTALARM is an XSI extension. SIGPOLL is unimplemented.
shell: introduce mrsh_run_exit_trap

Shells should call this function right before exiting.
builtin: add very basic trap implementation
Restrict PSn to parameter expansion

Closes: https://github.com/emersion/mrsh/issues/88
Improve error handling for invalid PSn values

Fallback to the default value on error. Also print the error message.

Closes: https://github.com/emersion/mrsh/issues/135
Next