ref: 7d1fc69ce60f4c6ca4aa28844af8067d608fd840 mrsh/shell/task/word.c -rw-r--r-- 7.4 KiB
Implement $! expansion
Stop embedding struct process into tasks
process: remove global state
Replace EXIT_* constants with integers
b201f014 — Cristian Adrián Ontivero 2 years ago
Correctly trim trailing newlines in $() expansions

Fixes https://github.com/emersion/mrsh/issues/74
Remove context.{stdin,stdout}_fileno

These we too fragile, nesting wasn't properly supported.

Instead, we now use dup() to setup and restore stdin and stdout in pipelines.
Do not use shm_open for command substitution

Use pipes instead. This has the drawback of blocking the shell while reading.

Fixes https://github.com/emersion/mrsh/issues/57
Move away from FILE

Fixes https://github.com/emersion/mrsh/issues/58
Close FILE structs after forking

Fixes https://github.com/emersion/mrsh/issues/48
Implement arg stack for functions
parser: finish arithmetic expression parser
shell: hard fail on arithmetic error
parser: parse arithmetic unop and parens
shell: parse arithmetic expression when evaluating word
shell: remove unnecessary cast
Introduce arithmetic AST
Introduce mrsh_variable
Fix expansion of $#
Make buffer public
shell: refactor, split into multiple files